How to use React Router for multiple pages on your web app (for beginners)

  Рет қаралды 167,764

Karsten Koerner

Karsten Koerner

Күн бұрын

Пікірлер: 160
@NikkiJ505
@NikkiJ505 Жыл бұрын
My dear dude, I took an 18 week bootcamp, stuck 5 weeks now in a final project using react-router, ready to just give it up. THIS VIDEO HELPED ME GET THE MISSING PIECE. THANK YOUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUU I will be watching only your videos from now on! THANK YOU!
@Ashur-lab
@Ashur-lab 5 ай бұрын
kinda the same story here XD
@muntahajabbar5814
@muntahajabbar5814 4 ай бұрын
Can you tell what did you do? cuz I have been trying for like 4 days straight but still stuck
@Shaddymaze
@Shaddymaze Жыл бұрын
From the thumbnail to the content, no filler, just pure value - thank you! Easiest subscribe I've ever done. Keep it up!
@TrevoltIV
@TrevoltIV Жыл бұрын
Of course, I'm a minimalist, looks like it's paying off haha
@Crackerbarrelkid55-vg6pl
@Crackerbarrelkid55-vg6pl 9 ай бұрын
Except for my eyes. My nose is pressed up to the screen to see whats happening. Bring your own magnifying glass nahmeannn
@IonizedComa
@IonizedComa 11 ай бұрын
Straight to the point, it's mutch more cleaner than conditionally rendering pages.
@IonizedComa
@IonizedComa 11 ай бұрын
@TrevoltIV I understand. I also found Server Side rendering a pain in React as well. I'm knowledgeable in backend and usually use template rendering for fullstack hobby projects and hackathons, that's why I started React. My end goal is NextJS though. You think it's possible to jump in Nextjs without too much experience in React?
@dal968
@dal968 10 ай бұрын
Thank god a direct video, simple with what i need. I searched a lot of videos that overcomplicated this simple concept. Subscribed, thanks for the easy explain
@idkwhattonamemyself2
@idkwhattonamemyself2 3 ай бұрын
bro, i tried 5 tutorials in a row and i was about to lose my freaking mind until i found yours, this one actually work unlike the others! and i am using a fancy nav bar and all and it still works, it's amazing! thank you so much!!!!!!
@figschannel
@figschannel 4 ай бұрын
the best tutorial ever, short and perfectly functioning, made my 3 months of researching about how to do it worth it
@vincentjansevanrensburg2378
@vincentjansevanrensburg2378 11 ай бұрын
excellent video, showing how to properly setup the directory is so important, having watched many videos I had too continually change my folder directory and relevant paths in the app. Also great to note that all this should be in a client folder so that the API and Server folders can be the in the parent folder with the client. self learning coding is not easy, but having to do things right the first time is so important
@thehitlist4046
@thehitlist4046 4 ай бұрын
This guy sounds like the most chill guy on earth. Almost as if he's being forced to even make the video 😂. Love it. Very easy subscribe.
@jonwakefield813
@jonwakefield813 Жыл бұрын
good video. Thanks for not wasting time on CSS / HTML and just focusing on react
@younesmed3770
@younesmed3770 9 ай бұрын
Thanks a lot bro, I've been searching for an answer for more than an hour now , god bless you
@navysealalex
@navysealalex Жыл бұрын
Just by looking at the thumbnail It solved my problem, thank you LOL. Will be studying your video heavily !
@dest5218
@dest5218 10 ай бұрын
My brother, keep making more videos, thanks react router was giving me the run around. Just subscribed and read you're profile, glad to see a christian and a gamer. Much love bro ❤
@diegoguerrero9364
@diegoguerrero9364 3 ай бұрын
Nice job! after many tutorials, this one is straight to success
@williamdevonshire356
@williamdevonshire356 Жыл бұрын
i liked that u didnt bother with css.. i hate when they go off on some stupid css tangent that has nothing to do with teaching the thing
@TrevoltIV
@TrevoltIV Жыл бұрын
I know right, I always cut to the chase because people are here to learn routing not CSS lol
@devTalks3641
@devTalks3641 5 ай бұрын
For real dude
@samuelmwendwa4327
@samuelmwendwa4327 2 ай бұрын
This is the realest comment ever
@TupiZubi
@TupiZubi Ай бұрын
OMG! Straight to the point. Thank you sir!
@ScriptSecretsExplain
@ScriptSecretsExplain Жыл бұрын
straight to the point w clear explanation. EZ +1 sub
@MahiBasharAkash
@MahiBasharAkash 8 ай бұрын
this video is real and working perfectly. anyone can study with this video😄😄😄😄
@0.1tahmidemam14
@0.1tahmidemam14 Жыл бұрын
it was very much helpful brooh!...really really thank ue...i was in a great problem from last 2 weeks in this task
@TrevoltIV
@TrevoltIV Жыл бұрын
Thanks for the feedback!
@talhaonder3389
@talhaonder3389 8 ай бұрын
simpler tutorial i ever seen keep doin this
@SomeFreeTimeActivities
@SomeFreeTimeActivities 6 ай бұрын
Dude you are a legend. You made that so easy to learn.
@ShanYTAu
@ShanYTAu 5 ай бұрын
You absolute legend. Cannot thank you enough. Great video
@khanarman9212
@khanarman9212 Жыл бұрын
For home/index page I have searched lots but I didn't find anything think but this video help me lot
@JohnKirigha-t3o
@JohnKirigha-t3o 4 ай бұрын
Thanx Man,you earned my subscription
@mirjalol_joyoflearning
@mirjalol_joyoflearning Жыл бұрын
no bullshit, just straightforward, thank u so much
@davi48596
@davi48596 11 ай бұрын
I'm having so much fun, thanks!!
@attahchristian6699
@attahchristian6699 Жыл бұрын
Thanks man, you just saved my heart. Bless your heart!
@0rekeroni
@0rekeroni 6 ай бұрын
Very helpful and straight forward thanks!
@RTech125
@RTech125 10 ай бұрын
You've earned yourself a sub :) Thank you mate. Out of curiosity mate did you have a VSCode extension installed that allowed you to get the auto-predictive text suggestion at 10:46?
@kostiantynkarzhanov9216
@kostiantynkarzhanov9216 Жыл бұрын
Thank you! Concise and very helpful tutorial! 💛
@cjdrix
@cjdrix Жыл бұрын
Thanks for this great content! It really helps me
@bryantony9836
@bryantony9836 11 ай бұрын
Knawledge!!!, Great video brother.
@danielwilson2827
@danielwilson2827 Жыл бұрын
Awesome job man, keep it up, you'll do well!
@ritiksaini9245
@ritiksaini9245 7 ай бұрын
thanks mate concept cleared + subscribed
@miusoft
@miusoft Жыл бұрын
Keep it up! good tutorial 🔥
@sixevensage7004
@sixevensage7004 6 ай бұрын
Thank you so much. Good Clear Content!
@juni2rdev
@juni2rdev 18 күн бұрын
thanks for the tips bro!
@fase8729
@fase8729 4 ай бұрын
10:00 let's say I have object like const ([cards])=useState[{ title: about, link: About, ...},{...}]; How can I add router into that.
@amancharlamanas3812
@amancharlamanas3812 Жыл бұрын
Keep making more informative videos, Thanks a ton!
@TrevoltIV
@TrevoltIV Жыл бұрын
Ten four good sir, no problem
@dr__ey
@dr__ey Жыл бұрын
this was very helpful!! thank you :)
@Loomisheep
@Loomisheep 6 ай бұрын
you're the goat, thank you
@kaushalyahansana5844
@kaushalyahansana5844 Жыл бұрын
Thanks for this great content!
@crix_05
@crix_05 Жыл бұрын
You are chill, man....
@fourchaite2585
@fourchaite2585 Жыл бұрын
Thank for that video you help me a lot !!!
@tubahosseini
@tubahosseini 8 ай бұрын
thanks. that was very helpful 😊
@ronzhang6510
@ronzhang6510 Жыл бұрын
Really helpful video, solve my problem
@ramdorak3149
@ramdorak3149 Жыл бұрын
Thanks for helping me out🤗🤗
@TrevoltIV
@TrevoltIV Жыл бұрын
No problem!
@SwiftCuts-vl5xg
@SwiftCuts-vl5xg 5 ай бұрын
Good explanation thank you
@chaitanyakrishna9398
@chaitanyakrishna9398 Жыл бұрын
Good Content up to mark explanation. I need small suggestion, Implementing Router tag in app.js or index.js, which would be best practice?
@terezachudejova4189
@terezachudejova4189 4 ай бұрын
Thanks for the video! What if I have some links that I want them to redirect me to the for example contact page? I just use the url in href in element?
@blackpurple9163
@blackpurple9163 Жыл бұрын
The * route checks other paths before leading to the error page, it doesn't matter where you put it
@safiuddinshaik322
@safiuddinshaik322 Жыл бұрын
Ohh, thanks dude
6 ай бұрын
Hi, what is the extension you used to have the suggestion and auto complete for the React like in the videos? I tried some extensions but it cannot recognize the structure like your one which is helpful
6 ай бұрын
@@TrevoltIV thank you so much
@ColeHartman1
@ColeHartman1 5 ай бұрын
Learned a lot
@glucose4420
@glucose4420 Жыл бұрын
thanks alot new subscriber!!
@sghangaan
@sghangaan 10 ай бұрын
This helps me a lot, Can I see your Index.js and index.html?
@Akbarali0011
@Akbarali0011 5 ай бұрын
The shortcut for opening terminal is ctl + `
@magnificentmesh2640
@magnificentmesh2640 Жыл бұрын
Thanks a lot bro🤩
@aswinkrishnam2606
@aswinkrishnam2606 2 ай бұрын
Wht was your node version when you were doing this
@adiletbaimyrzauulu6589
@adiletbaimyrzauulu6589 Жыл бұрын
The text is not readable unless you watch the tutorial full screen, but the content is awesome! Thanks!
@pinterbence5
@pinterbence5 Жыл бұрын
Thank you for the video! I have a problem: I deployed the web application, but when I open the URL of any pages except the home page, it won't load (404 error). Please can you help me? What could I have done wrong?
@TrevoltIV
@TrevoltIV Жыл бұрын
If you have discord I’d be happy to hop on a screen share real quick and help you
@TrevoltIV
@TrevoltIV Жыл бұрын
@@pinterbence5 Ok adding you now
@joshuaabulu9
@joshuaabulu9 Жыл бұрын
I have this same issue. How did you fix yours please?
@TrevoltIV
@TrevoltIV Жыл бұрын
@@joshuaabulu9 His issue was with his hosting provider, if your problem is only occurring when accessing the live version of the site then it's probably a routing issue that you need to fix on your hosting platform. By default, most hosting providers use a directory based routing system that will conflict with dynamic JavaScript based routing which is what React uses. You need to configure the routing to simply always redirect to the index page (In other words, the "yourdomain.com/" route).
@joshuaabulu9
@joshuaabulu9 Жыл бұрын
@@TrevoltIV Thank you I just did it Initially, I hosted the site on render, but it kept returning 'not found' when I try to go to a sub page directly from the URL It was the same issue with netlify. But netlify has a fix by adding a _redirects file to the public folder and adding a code inside that looks like this '/* index.html 200'.. now on netlify, it works, but still doesn't work on render
@andrewzerdelian5060
@andrewzerdelian5060 Жыл бұрын
What extension was that, that was suggesting you codes ?
@coding6291
@coding6291 Ай бұрын
Nice Video, the only thing that could be better is that your IDE fontsize is very small.
@rogin8265
@rogin8265 Жыл бұрын
What if i have multiple pages to display as index element?
@xtrarox3484
@xtrarox3484 Жыл бұрын
Hello my friend : I need some help. I am working on an application that, when pressing the button, will go to the control page of the router connected to it on the Wi-Fi network. I need the code for the button that will raise the user of the application to the page of the router connected to it by taking the IP Gateway address according to each router separately. Can you help???
@AboMeezO
@AboMeezO 5 ай бұрын
Dude, i have a react+vite app, i did what you did in the video and am getting blank, am getting nothing in the website
@bhawnaaggarwal6566
@bhawnaaggarwal6566 6 ай бұрын
What if we have database also which i am handling using get request,
@raffph
@raffph 11 ай бұрын
how about react landing page? it is okay to use react router? example when i click about it scroll down automatically
@SelinKonak-q5m
@SelinKonak-q5m Жыл бұрын
I want to connect two different react apps and use them in the same page (I have a home app and login app and ı want when I click the link in home page go to the login app) how can I do this ? Please help me
@dawnstar24
@dawnstar24 11 ай бұрын
I'm having a problem. Where when you deploy the build. The url dont work.
@vyankateshmiskin9618
@vyankateshmiskin9618 Жыл бұрын
When I open any page like aboutus, contact us expect home page it works good error occurs when I refresh that page not found how to resolve it
@ScaleShift
@ScaleShift 8 ай бұрын
Awesome, thanks!
@SherryTYR
@SherryTYR Жыл бұрын
Hey bro! Thanks for the tutorial. Where do we need to store images?
@ProfitEdge.01
@ProfitEdge.01 Жыл бұрын
in a public folder outside the src folder
@enithecreator
@enithecreator Жыл бұрын
Thanks for this.
@nemeziz_prime
@nemeziz_prime Жыл бұрын
Really easy to understand. Thanks for this video 🫡
@TechGeniusHacks
@TechGeniusHacks 11 ай бұрын
When you are typing the codes, it completes by itself? What is the extension called?
@TechGeniusHacks
@TechGeniusHacks 11 ай бұрын
@@TrevoltIVthanks. You explained very well btw 🙏🏻 . I subbed
@valzzu
@valzzu Жыл бұрын
Hi, i did this and it worked perfectly locally but when i built it, it no longer works.
@bhawnaaggarwal6566
@bhawnaaggarwal6566 6 ай бұрын
What if someone makes post request how we will handle that ??
@eobodai
@eobodai Жыл бұрын
You are the best
@shyexe
@shyexe 10 ай бұрын
Good tutorial ty
@PAPAGAIO-GAMES
@PAPAGAIO-GAMES Жыл бұрын
THANK YOU SO MUCH BROOO
@onlymusic5976
@onlymusic5976 Жыл бұрын
Thank you so much !!!
@kamohelolebona4666
@kamohelolebona4666 Жыл бұрын
Great tutorial I was kinda bored that You didnt talk about the Go back Home stuff ,But its great i figured it out on my own
@TrevoltIV
@TrevoltIV Жыл бұрын
Oh yeah I should’ve tossed that in there. It’s a bit confusing because the tag is replaced
@kamohelolebona4666
@kamohelolebona4666 Жыл бұрын
Yeah otherwize your videos are amazing 🔥
@definitelynotje
@definitelynotje 5 ай бұрын
wtf so useful thanks bruhh
@brian9790
@brian9790 Жыл бұрын
can you decrease the font size maybe, just to make sure we see absolutely nothing.....
@danton_Yn
@danton_Yn 3 ай бұрын
Yeah, but how am I expected to reach to this pages when clicking an link on my content? In a Nav for example...
@TrevoltIV
@TrevoltIV 3 ай бұрын
@@danton_Yn Page
@danton_Yn
@danton_Yn 3 ай бұрын
@@TrevoltIV bro im really thankful, i knew about but didn't thought it would apply the ref to url... Really appreciate the commitment over the comment section...
@adeoyemuhdfawas
@adeoyemuhdfawas Жыл бұрын
Thanks! 👍🏿👍🏿👍🏿
@TrevoltIV
@TrevoltIV Жыл бұрын
You’re welcome
@harryal100
@harryal100 8 ай бұрын
That is not working for me :-/ i normally use vue js and i am trying to learn React and if i put a file in a pages folder I cannot display it on the screen .. thanks for the video though
@thujosalu1635
@thujosalu1635 6 ай бұрын
The index part is not working for me!! What do i do??
@thujosalu1635
@thujosalu1635 6 ай бұрын
There is an error Cannot read properties of null (reading 'usefref')
@robensonn0004
@robensonn0004 2 жыл бұрын
Nice! Keep It Up
@TrevoltIV
@TrevoltIV 2 жыл бұрын
Ten four brother, thanks!
@phlox22
@phlox22 Жыл бұрын
do we have to type /home,/contacts all the time to navigate to those pages ? Can't we make them clickable like we do in vanilla html,css,js with anchor tags ?
@petrus2746
@petrus2746 11 ай бұрын
You could use normal anchor tags but this way you'll end up refreshing the whole page whenever you're navigating. Its recommended to use the from React Router Dom it works pretty much like a normal a tag but doesn't refresh the page every time you navigate to a different page, giving you that SPA feel.
@li-lunarink
@li-lunarink 4 ай бұрын
hey how to make a 404 unknow page
@aff7n
@aff7n Жыл бұрын
it is throwing me this error You cannot render a inside another
@hoxworth983
@hoxworth983 4 ай бұрын
Thanks dude
@rogers.adinda
@rogers.adinda 2 ай бұрын
Thank you!
@gigxr
@gigxr Жыл бұрын
hey guys, if your routes works locally doesnt but DOESN'T WORK when you deploy your site (error): 1. make a file inside "public" folder called "_redirects" without file extension 2. copy paste "/* /index.html 200" to the file 3. redeploy your site this was a problem for me when i was deploying thru netlify and always getting error.
@beans4274
@beans4274 5 ай бұрын
the goat
@Scum_p
@Scum_p 7 ай бұрын
best tutorial on react router!
@AdnanKhan-yg4ng
@AdnanKhan-yg4ng Жыл бұрын
subscribed from pakistan
@TrevoltIV
@TrevoltIV Жыл бұрын
Highly appreciated!
@ShreyasChaudhari
@ShreyasChaudhari Жыл бұрын
thank you so much
@monke3043
@monke3043 6 ай бұрын
before react router was working....now its not working....i am getting 16 errors
@DRKTRACKMuSIC
@DRKTRACKMuSIC 9 ай бұрын
good 👍👍
Responsive Navbar in React using React Router | Beginner Tutorial
26:16
Inertia 2.0: It's like Next but better (and you can use React!)
19:02
Theo - t3․gg
Рет қаралды 52 М.
黑天使只对C罗有感觉#short #angel #clown
00:39
Super Beauty team
Рет қаралды 36 МЛН
Quando eu quero Sushi (sem desperdiçar) 🍣
00:26
Los Wagners
Рет қаралды 15 МЛН
Quando A Diferença De Altura É Muito Grande 😲😂
00:12
Mari Maria
Рет қаралды 45 МЛН
Full React Tutorial #21 - The React Router
8:22
Net Ninja
Рет қаралды 533 М.
How is this Website so fast!?
13:39
Wes Bos
Рет қаралды 1,3 МЛН
How to DEVELOP a Viral App in 2025 (3/5)
10:51
Blake Anderson
Рет қаралды 4,6 М.
React JS Tutorial - #7 - Multiple Pages
22:21
Austin Davis
Рет қаралды 13 М.