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.
@bugsyplays35602 жыл бұрын
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.
@unknownman12 жыл бұрын
@@bugsyplays3560 ARe u sure u are using v6 in your project, as Switch is throwing an error in v6
@sabinoramirez26002 жыл бұрын
@@bugsyplays3560 correct
@sabinoramirez26002 жыл бұрын
@@unknownman1 bugsy is referring to the 'exact' part of . In v6 it works with just path
@susmantobealivebruh42382 жыл бұрын
@@unknownman1 remove "switch" and use "routes "instead of switch then use the code shown as above that should solve that problem
@stevegopop2 жыл бұрын
Bro, this guy has cliff hangers for react tutorials.....I cant stop watching
@NetNinja2 жыл бұрын
Haha, thanks Steve!
@sophiaonyoutube8 ай бұрын
who needs netflix when you have netninja on youtube?
@cyberohn8 ай бұрын
Honestly broo😂... I came to learn just React router and I find myself watching the whole tutorial 😂
@adityaverma61203 жыл бұрын
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.
@adeleke51402 жыл бұрын
Hi Shaun, it does seem like in Router6, a lot has changed and the path does work automatically
@meditationgalaxy98394 ай бұрын
yes it seems to have improved , dont need exact part
@StephenBeale5 ай бұрын
love this course and also the way you delivered the word "preview" with a flourish at 3:30😊😊 thanks again
@NetNinja5 ай бұрын
Thanks for your support as always Stephen :)
@beinyourguard3 жыл бұрын
Shaun, will you include styled components in this tutorial? I'd love to learn about it.
@wontontech Жыл бұрын
This is excellent, short and to the point! Thank you
@NetNinja Жыл бұрын
Thanks, hope you enjoyed it!
@ReachByteBurst2 жыл бұрын
congrats on a mil, thanks for the content!
@NetNinja2 жыл бұрын
Appreciate it! :)
@sadev04 жыл бұрын
Hey Shawn thanks for this :)... Is there any chance of Coming "Testing React - Typescript with JEST || ENZYME " Course?
@infobare26443 жыл бұрын
You are on point, most instructors do not explain what that "exact
@johnmoore42483 жыл бұрын
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
@rohitdummu75262 жыл бұрын
Thank you so much you have cleared all my doubts🥳
@NetNinja2 жыл бұрын
Happy to help Rohit! :)
@mohamedmousa27774 жыл бұрын
Always the best instructor
@HostDotPromo3 жыл бұрын
Agreed. His tutorials are so good.
@dailydosehq-official Жыл бұрын
If you are working with V6 you also do not need to use the exact in the Route declaration.
@anthonycalo40473 жыл бұрын
You the man! Thanks for the videos. Every other react router video is unclear or some guy from India
@joelmurphy7702 Жыл бұрын
In addition to @munchyBonbon 's comment, remember to define an 'element' attribute if you're using v6 of react-router-dom:
@kashmirtechtv29483 жыл бұрын
Amazing!! You clear the things in a very short time
@carlijn14603 жыл бұрын
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!
@tarekghosn36482 жыл бұрын
for the algorithm we need to send this to the world.
@spookimiiki58913 жыл бұрын
Very good video! Straight to the point!
@Yasmine_habun2 жыл бұрын
Thanks a lot for everything literally. THANKS
@amjadiqbalkhanniazi4 жыл бұрын
great tutorials, thanks, it will be good if you include context api in this tutorial with useReducer hook
@johnconnor97873 жыл бұрын
Please, consider someday to make a playlist on MERN stack
@basilm.b8499 Жыл бұрын
In recent versions of react-router-dom, the Switch component has been replaced by Routes function App() { return ( ); }
@indianlongboarder28443 жыл бұрын
i finally learned the use of exact thank you
@scanpower84392 жыл бұрын
I need to sleep and chill WHY AM I SO ADDICTED TO THIS xD
@pranavmishra93662 жыл бұрын
Thanks buddy, I implemented and it worked.
@NetNinja2 жыл бұрын
Glad it helped Pranav!
@theobellash64402 жыл бұрын
What about lazy loading a component?
@oscardbg96543 жыл бұрын
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...
@catz4976 ай бұрын
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
@kashmirtechtv29483 жыл бұрын
It looks for the first address It finds / so it shows homepage that's why we use exact
@Gamesoc8 күн бұрын
Note for viewers, React Router v6 uses exact matching by default.
@matthewsteedman68673 жыл бұрын
Hey Guys , "Switch" has been Deprecated is there any other alternative?
@JanabSmile3 жыл бұрын
Use 'Routes' instead of Switch.... just replace every 'Switch' with 'Routes'
@gracelee51823 жыл бұрын
if the Switch tag renders the route component exclusively, why do we need the exact property in the first place? I'm confused.
@nandopookey91952 жыл бұрын
Thankyou very much sir
@renzjorgesjaredsanfernando34417 ай бұрын
THANK YOU SO MUCHHHHH
@NetNinja7 ай бұрын
@clarencelindh11783 жыл бұрын
gz to 800k
@sertacekici33423 жыл бұрын
This is amazing. Good job as always. Thank you Shaun
@himadribhargava84553 жыл бұрын
Awesome tutorial series
@mohamedhourri56074 жыл бұрын
i love u man !!
@jess1403 жыл бұрын
great video!
@alexstaresson95173 жыл бұрын
nice stuff!
@rownokmahbub3 жыл бұрын
'useEffect' is defined but never used how could i Solve this error? anyone please help me?
@bharathr59363 жыл бұрын
Thank you
@artihlec3 жыл бұрын
actually /c will not match /create , but /np will match /np/something (things between slashes must be exactly the same )
@Ridhu3 жыл бұрын
"Things between slashes" also refers to things after the last slash right?
@developerbox30793 жыл бұрын
@@Ridhu try and seeeeeee
@natnaelghirma26173 жыл бұрын
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.
@developerbox30793 жыл бұрын
did you find a way? because I have a same problem as well .d
@ghofranedarragi56013 жыл бұрын
thank you very much
@mkmalikcom3 жыл бұрын
thank-you ♥️
@naolchala43543 жыл бұрын
Good tutorial, can you add à video with router animation?
@learningit25722 жыл бұрын
I love you!!!
@hasanalkhder62603 жыл бұрын
Great tutorial's
@wpxpert982 жыл бұрын
great! thank you
@NetNinja2 жыл бұрын
No worries! thanks for watching :)
@Mahmudulhasan-ts5hm3 жыл бұрын
thanks
@DilshardAhamed-q2e Жыл бұрын
Update in react-router-dom V6 return ( );
@allenjohn48634 жыл бұрын
It would be great if we get a video on how to integrate Gpay into our website.
@all-in-all78624 жыл бұрын
Can u create react-router beta version-6
@nick_jacob3 жыл бұрын
Why wouldn't they just build in the 'exact' property into the 'path' property? That seems unnecessary.
@Bee4Brendan6 ай бұрын
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
@ridl273 жыл бұрын
ty
@adelgafo74124 жыл бұрын
good job sir
@kashmirtechtv29483 жыл бұрын
Which job?
@vojka29733 жыл бұрын
Ninja can you do react tutorial on udemy bro ?! PLZ
@ZTF6663 жыл бұрын
compared to nuxt , nuxt is a blessing in this area ! haha
@ckatke4 жыл бұрын
Ohh 😯 I thought it was all
@Jacksons_are_jackson3 жыл бұрын
routerv6 done this by default :D
@memory888811 ай бұрын
Let's save that now and... pRRreview.
@akkaradechsrithongchai7766 Жыл бұрын
🙏
@NetNinja Жыл бұрын
@christianibana9332 жыл бұрын
React router v6 made routing easier and less code
@icetmzz90742 жыл бұрын
this is no longer needed in v6
@taicheeeee Жыл бұрын
【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.
@muskankoshti26652 жыл бұрын
plzzzzzzzzzzzzzzzzzzzzzz share the codeeeeeeeeeeeeeeeeeeeee
@PamdoraPam3 жыл бұрын
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