Full React Tutorial #22 - Exact Match Routes

  Рет қаралды 253,467

Net Ninja

Net Ninja

Күн бұрын

Пікірлер
@munchybonbon8675
@munchybonbon8675 2 жыл бұрын
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.
@bugsyplays3560
@bugsyplays3560 2 жыл бұрын
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.
@unknownman1
@unknownman1 2 жыл бұрын
@@bugsyplays3560 ARe u sure u are using v6 in your project, as Switch is throwing an error in v6
@sabinoramirez2600
@sabinoramirez2600 2 жыл бұрын
@@bugsyplays3560 correct
@sabinoramirez2600
@sabinoramirez2600 2 жыл бұрын
@@unknownman1 bugsy is referring to the 'exact' part of . In v6 it works with just path
@susmantobealivebruh4238
@susmantobealivebruh4238 2 жыл бұрын
@@unknownman1 remove "switch" and use "routes "instead of switch then use the code shown as above that should solve that problem
@stevegopop
@stevegopop 2 жыл бұрын
Bro, this guy has cliff hangers for react tutorials.....I cant stop watching
@NetNinja
@NetNinja 2 жыл бұрын
Haha, thanks Steve!
@sophiaonyoutube
@sophiaonyoutube 8 ай бұрын
who needs netflix when you have netninja on youtube?
@cyberohn
@cyberohn 8 ай бұрын
Honestly broo😂... I came to learn just React router and I find myself watching the whole tutorial 😂
@adityaverma6120
@adityaverma6120 3 жыл бұрын
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.
@adeleke5140
@adeleke5140 2 жыл бұрын
Hi Shaun, it does seem like in Router6, a lot has changed and the path does work automatically
@meditationgalaxy9839
@meditationgalaxy9839 4 ай бұрын
yes it seems to have improved , dont need exact part
@StephenBeale
@StephenBeale 5 ай бұрын
love this course and also the way you delivered the word "preview" with a flourish at 3:30😊😊 thanks again
@NetNinja
@NetNinja 5 ай бұрын
Thanks for your support as always Stephen :)
@beinyourguard
@beinyourguard 3 жыл бұрын
Shaun, will you include styled components in this tutorial? I'd love to learn about it.
@wontontech
@wontontech Жыл бұрын
This is excellent, short and to the point! Thank you
@NetNinja
@NetNinja Жыл бұрын
Thanks, hope you enjoyed it!
@ReachByteBurst
@ReachByteBurst 2 жыл бұрын
congrats on a mil, thanks for the content!
@NetNinja
@NetNinja 2 жыл бұрын
Appreciate it! :)
@sadev0
@sadev0 4 жыл бұрын
Hey Shawn thanks for this :)... Is there any chance of Coming "Testing React - Typescript with JEST || ENZYME " Course?
@infobare2644
@infobare2644 3 жыл бұрын
You are on point, most instructors do not explain what that "exact
@johnmoore4248
@johnmoore4248 3 жыл бұрын
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
@rohitdummu7526
@rohitdummu7526 2 жыл бұрын
Thank you so much you have cleared all my doubts🥳
@NetNinja
@NetNinja 2 жыл бұрын
Happy to help Rohit! :)
@mohamedmousa2777
@mohamedmousa2777 4 жыл бұрын
Always the best instructor
@HostDotPromo
@HostDotPromo 3 жыл бұрын
Agreed. His tutorials are so good.
@dailydosehq-official
@dailydosehq-official Жыл бұрын
If you are working with V6 you also do not need to use the exact in the Route declaration.
@anthonycalo4047
@anthonycalo4047 3 жыл бұрын
You the man! Thanks for the videos. Every other react router video is unclear or some guy from India
@joelmurphy7702
@joelmurphy7702 Жыл бұрын
In addition to @munchyBonbon 's comment, remember to define an 'element' attribute if you're using v6 of react-router-dom:
@kashmirtechtv2948
@kashmirtechtv2948 3 жыл бұрын
Amazing!! You clear the things in a very short time
@carlijn1460
@carlijn1460 3 жыл бұрын
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!
@tarekghosn3648
@tarekghosn3648 2 жыл бұрын
for the algorithm we need to send this to the world.
@spookimiiki5891
@spookimiiki5891 3 жыл бұрын
Very good video! Straight to the point!
@Yasmine_habun
@Yasmine_habun 2 жыл бұрын
Thanks a lot for everything literally. THANKS
@amjadiqbalkhanniazi
@amjadiqbalkhanniazi 4 жыл бұрын
great tutorials, thanks, it will be good if you include context api in this tutorial with useReducer hook
@johnconnor9787
@johnconnor9787 3 жыл бұрын
Please, consider someday to make a playlist on MERN stack
@basilm.b8499
@basilm.b8499 Жыл бұрын
In recent versions of react-router-dom, the Switch component has been replaced by Routes function App() { return ( ); }
@indianlongboarder2844
@indianlongboarder2844 3 жыл бұрын
i finally learned the use of exact thank you
@scanpower8439
@scanpower8439 2 жыл бұрын
I need to sleep and chill WHY AM I SO ADDICTED TO THIS xD
@pranavmishra9366
@pranavmishra9366 2 жыл бұрын
Thanks buddy, I implemented and it worked.
@NetNinja
@NetNinja 2 жыл бұрын
Glad it helped Pranav!
@theobellash6440
@theobellash6440 2 жыл бұрын
What about lazy loading a component?
@oscardbg9654
@oscardbg9654 3 жыл бұрын
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...
@catz497
@catz497 6 ай бұрын
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
@kashmirtechtv2948
@kashmirtechtv2948 3 жыл бұрын
It looks for the first address It finds / so it shows homepage that's why we use exact
@Gamesoc
@Gamesoc 8 күн бұрын
Note for viewers, React Router v6 uses exact matching by default.
@matthewsteedman6867
@matthewsteedman6867 3 жыл бұрын
Hey Guys , "Switch" has been Deprecated is there any other alternative?
@JanabSmile
@JanabSmile 3 жыл бұрын
Use 'Routes' instead of Switch.... just replace every 'Switch' with 'Routes'
@gracelee5182
@gracelee5182 3 жыл бұрын
if the Switch tag renders the route component exclusively, why do we need the exact property in the first place? I'm confused.
@nandopookey9195
@nandopookey9195 2 жыл бұрын
Thankyou very much sir
@renzjorgesjaredsanfernando3441
@renzjorgesjaredsanfernando3441 7 ай бұрын
THANK YOU SO MUCHHHHH
@NetNinja
@NetNinja 7 ай бұрын
@clarencelindh1178
@clarencelindh1178 3 жыл бұрын
gz to 800k
@sertacekici3342
@sertacekici3342 3 жыл бұрын
This is amazing. Good job as always. Thank you Shaun
@himadribhargava8455
@himadribhargava8455 3 жыл бұрын
Awesome tutorial series
@mohamedhourri5607
@mohamedhourri5607 4 жыл бұрын
i love u man !!
@jess140
@jess140 3 жыл бұрын
great video!
@alexstaresson9517
@alexstaresson9517 3 жыл бұрын
nice stuff!
@rownokmahbub
@rownokmahbub 3 жыл бұрын
'useEffect' is defined but never used how could i Solve this error? anyone please help me?
@bharathr5936
@bharathr5936 3 жыл бұрын
Thank you
@artihlec
@artihlec 3 жыл бұрын
actually /c will not match /create , but /np will match /np/something (things between slashes must be exactly the same )
@Ridhu
@Ridhu 3 жыл бұрын
"Things between slashes" also refers to things after the last slash right?
@developerbox3079
@developerbox3079 3 жыл бұрын
@@Ridhu try and seeeeeee
@natnaelghirma2617
@natnaelghirma2617 3 жыл бұрын
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.
@developerbox3079
@developerbox3079 3 жыл бұрын
did you find a way? because I have a same problem as well .d
@ghofranedarragi5601
@ghofranedarragi5601 3 жыл бұрын
thank you very much
@mkmalikcom
@mkmalikcom 3 жыл бұрын
thank-you ♥️
@naolchala4354
@naolchala4354 3 жыл бұрын
Good tutorial, can you add à video with router animation?
@learningit2572
@learningit2572 2 жыл бұрын
I love you!!!
@hasanalkhder6260
@hasanalkhder6260 3 жыл бұрын
Great tutorial's
@wpxpert98
@wpxpert98 2 жыл бұрын
great! thank you
@NetNinja
@NetNinja 2 жыл бұрын
No worries! thanks for watching :)
@Mahmudulhasan-ts5hm
@Mahmudulhasan-ts5hm 3 жыл бұрын
thanks
@DilshardAhamed-q2e
@DilshardAhamed-q2e Жыл бұрын
Update in react-router-dom V6 return ( );
@allenjohn4863
@allenjohn4863 4 жыл бұрын
It would be great if we get a video on how to integrate Gpay into our website.
@all-in-all7862
@all-in-all7862 4 жыл бұрын
Can u create react-router beta version-6
@nick_jacob
@nick_jacob 3 жыл бұрын
Why wouldn't they just build in the 'exact' property into the 'path' property? That seems unnecessary.
@Bee4Brendan
@Bee4Brendan 6 ай бұрын
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
@ridl27
@ridl27 3 жыл бұрын
ty
@adelgafo7412
@adelgafo7412 4 жыл бұрын
good job sir
@kashmirtechtv2948
@kashmirtechtv2948 3 жыл бұрын
Which job?
@vojka2973
@vojka2973 3 жыл бұрын
Ninja can you do react tutorial on udemy bro ?! PLZ
@ZTF666
@ZTF666 3 жыл бұрын
compared to nuxt , nuxt is a blessing in this area ! haha
@ckatke
@ckatke 4 жыл бұрын
Ohh 😯 I thought it was all
@Jacksons_are_jackson
@Jacksons_are_jackson 3 жыл бұрын
routerv6 done this by default :D
@memory8888
@memory8888 11 ай бұрын
Let's save that now and... pRRreview.
@akkaradechsrithongchai7766
@akkaradechsrithongchai7766 Жыл бұрын
🙏
@NetNinja
@NetNinja Жыл бұрын
@christianibana933
@christianibana933 2 жыл бұрын
React router v6 made routing easier and less code
@icetmzz9074
@icetmzz9074 2 жыл бұрын
this is no longer needed in v6
@taicheeeee
@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.
@muskankoshti2665
@muskankoshti2665 2 жыл бұрын
plzzzzzzzzzzzzzzzzzzzzzz share the codeeeeeeeeeeeeeeeeeeeee
@PamdoraPam
@PamdoraPam 3 жыл бұрын
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
@jyotirmaysengupta2360
@jyotirmaysengupta2360 4 жыл бұрын
First
@shiyadh4471
@shiyadh4471 3 жыл бұрын
thanks
@jacobzak7494
@jacobzak7494 2 жыл бұрын
Thanks
@forresthu6204
@forresthu6204 2 жыл бұрын
Thanks
@subee128
@subee128 Жыл бұрын
Thanks
Full React Tutorial #23 - Router Links
3:30
Net Ninja
Рет қаралды 228 М.
Learn React Router v6 In 45 Minutes
46:20
Web Dev Simplified
Рет қаралды 575 М.
黑天使被操控了#short #angel #clown
00:40
Super Beauty team
Рет қаралды 61 МЛН
Tuna 🍣 ​⁠@patrickzeinali ​⁠@ChefRush
00:48
albert_cancook
Рет қаралды 148 МЛН
Enceinte et en Bazard: Les Chroniques du Nettoyage ! 🚽✨
00:21
Two More French
Рет қаралды 42 МЛН
Full React Tutorial #24 - useEffect Cleanup
6:50
Net Ninja
Рет қаралды 220 М.
Every React Concept Explained in 12 Minutes
11:53
Code Bootcamp
Рет қаралды 861 М.
React Tutorial for Beginners
1:20:04
Programming with Mosh
Рет қаралды 3,6 МЛН
Full React Tutorial #25 - Route Parameters
8:03
Net Ninja
Рет қаралды 215 М.
Full React Tutorial #20 - Making a Custom Hook
8:49
Net Ninja
Рет қаралды 273 М.
Full React Tutorial #21 - The React Router
8:22
Net Ninja
Рет қаралды 531 М.
黑天使被操控了#short #angel #clown
00:40
Super Beauty team
Рет қаралды 61 МЛН