Great work on this video. As noted in a comment below, the Switch has been replaced with Routes but aside from that this is a great overview of how to set up a multi page react SPA. Thank you!
For those who are getting error of switch export:- 𝐒𝐨𝐥𝐮𝐭𝐢𝐨𝐧#𝟎𝟏 In react-router-dom v6, "Switch" is replaced by routes "Routes". You need to update the import from import { Switch, Route } from "react-router-dom"; to import { Routes ,Route } from 'react-router-dom'; You also need to update to 𝐒𝐨𝐥𝐮𝐭𝐢𝐨𝐧#𝟎𝟐 uninstall the version 6 of react-router-dom: npm uninstall react-router-dom And installed version 5.2.0 of react-router-dom: npm install react-router-dom@5.2.0
I have installed react-router-dom. and I got an error said "Attempted import error: 'Switch' is not exported from 'react-router-dom'." Do you know why?
Thank you very much, It's very helpful , regards and Jesus' Blessings from Lima Peru
Glad you like it, please don't forget to subscribe to my TH-cam channel.
Great work on this video. As noted in a comment below, the Switch has been replaced with Routes but aside from that this is a great overview of how to set up a multi page react SPA. Thank you!
Glad to help.
Quick video on the nav bar, superb. Please update that the 'Routes' has replaced the 'Switch' functionality.
I have already published video with updated Routes please go through my channel.
Change the 'Switch' to 'Routes' in the following import:
import { BrowserRouter, Routes, Route, Link } from "react-router-dom";
This worked for me.
For anyone following this tutorial.. Incase the routing bit does not work, try importing Route, Routes as Switch is omitted in v6 of react router DOM!
Thanks for sharing ! I have already published another video addressing the issue.
For those who are getting error of switch export:-
𝐒𝐨𝐥𝐮𝐭𝐢𝐨𝐧#𝟎𝟏
In react-router-dom v6, "Switch" is replaced by routes "Routes". You need to update the import from
import { Switch, Route } from "react-router-dom";
to
import { Routes ,Route } from 'react-router-dom';
You also need to update
to
𝐒𝐨𝐥𝐮𝐭𝐢𝐨𝐧#𝟎𝟐
uninstall the version 6 of react-router-dom:
npm uninstall react-router-dom
And installed version 5.2.0 of react-router-dom:
npm install react-router-dom@5.2.0
all in one just 13 min your explanation great bro💔
Be sure to subscribe
This video is very helpful Thank you so much I will share this video with my classmates ❤️💙 thank you so much
Thank you so much mate.
Thanks man finally I got the real react bootstrap router video, and I was using material ui that seems difficult for me
Glad you liked it.
Very good tutorial! Straight to the point and also very insightful on how to look up documentation by yourself. Thank you so much!
Thank you so much.
you got the job done, but it was very messy demo
Thank you most of the tutorial i searh is just creating navbar without functionality
Glad it helped you . Please don't forget to subscribe.
Thank you so much for the support. I made 100% to subcribed your Chanel
Awesome thank you! Be sure to subscribe.
Thanks for this tutorial please upload more videos for creating website using react with bootstrap
Sure I will upload in future
Don't forget to subscribe
th-cam.com/video/d0NrTG2yhiw/w-d-xo.html
Finally it worked thx so much
thankyou you saved my day today
😊😊😊😊😊
Happy to help
Please can you make a video on how to navigate into multiple pages after clicking a navbar?
Works fine, but where is menu hide property after u click menu item?
awesome tutorial, straight to the point and a good pace
Glad it was helpful.
Thank you! Very good explanation!
How do we route to the .
"as={Link} to=" does not seem to be working.
very good tutorial! I really learned a lot. I have one issue tho. I can't swith between pages until i press enter. It's not doing it when I click :(
I have other video for navbar check on my channel.
that's the best tutorial!!!!
Be sure to subscribe.
The way he calls bootstrap as "bootystrap" cracks me up a little.
Haha okay.
Thank you. Your video was very helpful
Glad it was helpful!
Thank you so much. It’s very helpful
Glad it was helpful! Be sure to subscribe.
Brilliant Arjun!
Thank you so much.
Awesome and to the point!
Glad it was helpful for you. Be sure to subscribe to my channel.
Is react-router-dom the only way to go with this? There is no built in functionality for this in react or even react-bootstrap?
No unlike angular react doesn't have built in routing functionality, use have to use react-router-dom.
th-cam.com/video/d0NrTG2yhiw/w-d-xo.html
thanks man nice tutorial!
Glad it helped!
Helped alot, thanks!
Glad to hear it! Be sure to subscribe.
When I start npm start, it shows only navbar, but the body was blank, even though I have something on the body.do you know why?
Thank you so much you are a blessing!
You are so welcome
good job👏
well done man!!
Thank you Be sure to subscribe.
THANK YOU SO MUCH!!
You're welcome!
Everytime "let me" is said drink 1 shot
I'm getting this Error-----export 'Switch' (imported as 'Switch') was not found in 'react-router-dom'
I have published new video on the same topic see on the end screen or link in the description.
is react-bootstrap still relevant? why not using vanilla bootstrap 5?
I will try using that. Don't forget to subscribe my channel. I use material UI normally.
outstanding explanation
Thank you! so much don't forget to subscribe my channel
Thanks for this tutorial
Welcome, Please don't forget to subscribe.
Why does my navbar stays in the middle of the screan and not in the top???
Thanks..! fast and perfect..!
Glad it worked for you
very useful thanks
Welcome, Glad you liked it.
The selection state of the Link disappears after selected. How do I keep selection?
I will upload on that soon.
The best
Thank U
:)
Glad you liked it.
I have installed react-router-dom. and I got an error said "Attempted import error: 'Switch' is not exported from 'react-router-dom'." Do you know why?
Now in new version you have to use instead of Switch use older version instead it will work for you.
@@CodeWithArjun i used instead of now my navbar is not showing and my browser console is showing errors
@@bbbzbdbsns Instead of using use
Likewise for About and Home. If you again get problem jion discord, I can help you to solve.
@@CodeWithArjun Tried changing the Route Path still getting errors in console about "Router"'
@@omaraly3296 I have published new video for that check out on my channel.
Thank You.
i am getting this error " Attempted import error: 'Switch' is not exported from 'react-router-dom'. "
Add this to the navbarcomp
import {
BrowserRouter as Router,
Switch,
Route,
Link
} from "react-router-dom";
@@ProjetoCloudcom I did added Switch on the import but its still gave me the same error
@@syawadhilahpradipta828 did you solve it. I am getting the same error
@@syawadhilahpradipta828found the solution
how to you create links to the dropdown
thank you arjun
Is it working ? for newer version or you replaced with ?
@@CodeWithArjun i will try later arjun
@@CodeWithArjun what version of react boostrap is that arjun?
@@pejuagsuksss Not for bootstrap i was taling about react router dom version 6. I am publishing new video today watch that.
@@CodeWithArjun ok sir i will watch later
It is useful
Glad you think so!
bro still same screen at 2:10. it doesnt write hello
why when i type "rcc" nothing happend please i need help
install react sniplets from the extension of vscode.
@@CodeWithArjun thank you 😍
and one more thing how can i become good in react js
master basics and try to build some projects
th-cam.com/video/d0NrTG2yhiw/w-d-xo.html
switch d'not react router dom 6
switch => routes
i have already got new video using routes you can check out on my channel.
where is the source code
Visit my github account arjungautam1
@@CodeWithArjun its not there you repo is empty
@@digender now check i have just uploaded. or you can directly find the link on description.