Hi Shaun, I think the explanation for partial matching is a bit incorrect at 2:40. /create URL won't match /c route, partial match means partial after every forward slash in the URL. For example, the URL /create/user/123 will match the routes /create or /create/user/, but it won't match any partial word. And this makes more sense because using partial matches, we can nest the routes.
【2023/6/29】 #NO NEED TO WATCH THIS CLIP.# I think the content this clip talked about was kind of bug of react routers. However, they've fixed this problem. Don't need to watch this video now.
Ninjas, how can i deploy locally the app if i'm using webpack, i've tried the vscode live server and express server for the index.html but didn't work...
How does this work with unit testing? I'm having issues when trying to test that the Stats button on my app takes you to the stats page, it's expecting "/stats" but receiving "/". I suspect it's a similar issue to the exact path issue you mentioned in these videos but I can't for the life of me figure out how to make the test check the whole string specifically
Hi Shawn, I am really excited to see the final product so I am learning a head by studying your github codes up to lesson 32. And again, thank you for creating these educative and informative series. Cheers
thank you so much for this video! I am new to react and i had some trouble with routes, but you explained it so well in this video and it helped a lot! Keep up the good work!
Just a heads up for other viewers, with React Router v6 (latest version), the code would look like this:
Basically has been replaced with , and accepts the element attribute, to which you assign the component you would like to load.
Does this also mean the exact prop isn't needed?
I'm using 6 and my Create page seemed to work fine without it when done like this.
@@bugsyplays3560 ARe u sure u are using v6 in your project, as Switch is throwing an error in v6
@@bugsyplays3560 correct
@@unknownman1 bugsy is referring to the 'exact' part of . In v6 it works with just path
@@unknownman1 remove "switch" and use "routes "instead of switch then use the code shown as above that should solve that problem
Bro, this guy has cliff hangers for react tutorials.....I cant stop watching
Haha, thanks Steve!
who needs netflix when you have netninja on youtube?
Honestly broo😂... I came to learn just React router and I find myself watching the whole tutorial 😂
Hi Shaun, it does seem like in Router6, a lot has changed and the path does work automatically
yes it seems to have improved , dont need exact part
Hey Shawn thanks for this :)...
Is there any chance of Coming "Testing React - Typescript with JEST || ENZYME " Course?
Hi Shaun, I think the explanation for partial matching is a bit incorrect at 2:40. /create URL won't match /c route, partial match means partial after every forward slash in the URL. For example, the URL /create/user/123 will match the routes /create or /create/user/, but it won't match any partial word. And this makes more sense because using partial matches, we can nest the routes.
You are on point, most instructors do not explain what that "exact
Always the best instructor
Agreed. His tutorials are so good.
In addition to @munchyBonbon 's comment, remember to define an 'element' attribute if you're using v6 of react-router-dom:
Thank you so much you have cleared all my doubts🥳
Happy to help Rohit! :)
Thanks
Amazing!! You clear the things in a very short time
great tutorials, thanks, it will be good if you include context api in this tutorial with useReducer hook
Very good video! Straight to the point!
Good tutorial, can you add à video with router animation?
if the Switch tag renders the route component exclusively, why do we need the exact property in the first place? I'm confused.
gz to 800k
Thank you
thank you very much
great video!
I love you!!!
ty
Why wouldn't they just build in the 'exact' property into the 'path' property? That seems unnecessary.
good job sir
Which job?
Ohh 😯 I thought it was all
plzzzzzzzzzzzzzzzzzzzzzz share the codeeeeeeeeeeeeeeeeeeeee
【2023/6/29】
#NO NEED TO WATCH THIS CLIP.#
I think the content this clip talked about was kind of bug of react routers.
However, they've fixed this problem.
Don't need to watch this video now.
First
Shaun, will you include styled components in this tutorial? I'd love to learn about it.
Thanks
You the man! Thanks for the videos. Every other react router video is unclear or some guy from India
thanks
Please, consider someday to make a playlist on MERN stack
If you are working with V6 you also do not need to use the exact in the Route declaration.
When you misspelled exact and it wasn't underlined and you saved it, I was about to freak out that it worked 😂 then it didn't
Ninjas, how can i deploy locally the app if i'm using webpack, i've tried the vscode live server and express server for the index.html but didn't work...
Update in react-router-dom V6
return (
);
Let's save that now and... pRRreview.
In recent versions of react-router-dom, the Switch component has been replaced by Routes
function App() {
return (
);
}
How does this work with unit testing? I'm having issues when trying to test that the Stats button on my app takes you to the stats page, it's expecting "/stats" but receiving "/". I suspect it's a similar issue to the exact path issue you mentioned in these videos but I can't for the life of me figure out how to make the test check the whole string specifically
Hi Shawn, I am really excited to see the final product so I am learning a head by studying your github codes up to lesson 32. And again, thank you for creating these educative and informative series. Cheers
Hey Guys , "Switch" has been Deprecated is there any other alternative?
Use 'Routes' instead of Switch.... just replace every 'Switch' with 'Routes'
this is no longer needed in v6
This is excellent, short and to the point! Thank you
Thanks, hope you enjoyed it!
congrats on a mil, thanks for the content!
Appreciate it! :)
Thanks
Thanks a lot for everything literally. THANKS
I need to sleep and chill WHY AM I SO ADDICTED TO THIS xD
great! thank you
No worries! thanks for watching :)
'useEffect' is defined but never used how could i Solve this error? anyone please help me?
It looks for the first address
It finds / so it shows homepage that's why we use exact
for the algorithm we need to send this to the world.
React router v6 made routing easier and less code
compared to nuxt , nuxt is a blessing in this area ! haha
routerv6 done this by default :D
What about lazy loading a component?
Ninja can you do react tutorial on udemy bro ?! PLZ
It would be great if we get a video on how to integrate Gpay into our website.
i finally learned the use of exact thank you
Can u create react-router beta version-6
thank-you ♥️
Thankyou very much sir
love this course and also the way you delivered the word "preview" with a flourish at 3:30😊😊 thanks again
Thanks for your support as always Stephen :)
thank you so much for this video! I am new to react and i had some trouble with routes, but you explained it so well in this video and it helped a lot! Keep up the good work!
THANK YOU SO MUCHHHHH
🙏
Great tutorial's
i love u man !!
nice stuff!
thanks
Is there a better way to route. It seems very tedious to create routing this way. If you have 20 routes, it will be like 60 lines.
did you find a way?
because I have a same problem as well .d
Thanks buddy, I implemented and it worked.
Glad it helped Pranav!
actually /c will not match /create , but /np will match /np/something (things between slashes must be exactly the same )
"Things between slashes" also refers to things after the last slash right?
@@Ridhu try and seeeeeee
Awesome tutorial series
This is amazing. Good job as always. Thank you Shaun
Is not easy to understand the routes, I had to figure out that you already made the hrefs in the navbar point to the routes you were using here