React Router Setup + Usage | Complete React Course in Hindi #16

  Рет қаралды 512,912

CodeWithHarry

CodeWithHarry

Күн бұрын

Пікірлер: 1 600
@anuraggupta4555
@anuraggupta4555 3 жыл бұрын
For anyone watching in November 2021, this is the updated React-16 syntax ``` ```
@Sahil-nm7di
@Sahil-nm7di 3 жыл бұрын
yr yeh toh mene kr liya but navbar.js mein a tag ko Link mein change krne mein error aa rha hai.... any idea
@bhavikatibrewal5327
@bhavikatibrewal5327 3 жыл бұрын
@@Sahil-nm7di check if you have imported link in the navbar component
@aakashjyoti4580
@aakashjyoti4580 3 жыл бұрын
thank-you buddy
@getknowledgebite3413
@getknowledgebite3413 3 жыл бұрын
Big Thnx Switch ke case m agr hum Switch Tag hta dete the too sare compnent show hote the but Routes Tag use na kre to error aata h ......Or switch m hum direct ye syntax use kr lete the jo bhot easy tha'
@veereshgv
@veereshgv 3 жыл бұрын
thank you, it worked..
@CodeWithHarry
@CodeWithHarry 2 жыл бұрын
Update June 2022: React router dom ka syntax thoda sa change ho gaya hai. Documentation dekhkar thoda sa adjust kar lena :)
@harshitrawat5847
@harshitrawat5847 2 жыл бұрын
If You are getting an error because of update pls update your code... and also use this in the Navbar Home {props.aboutText}
@rajsaxena1624
@rajsaxena1624 2 жыл бұрын
@CodewithHarry bhai successfully compile ho gaya but white screen aarha he. Please update ka ek video banado chota sa
@ParthivShah
@ParthivShah 2 жыл бұрын
Ok bhaiya thanks for amazing course for free.
@rupali_baranwal
@rupali_baranwal 2 жыл бұрын
@@ICSSachinSingh NoiTs not working white screen aa rahi hai
@rupali_baranwal
@rupali_baranwal 2 жыл бұрын
@@harshitrawat5847 I am getting blank screen ..please help me
@nme7885
@nme7885 Жыл бұрын
*UPDATE* For Anyone who is doing this with React *Router V6* as of 8th May 2023 . Few things have been *updated* .. 1. You cannot use Switch anymore with v6 you need to use BrowserRouter(Its same as Router) instead .Don't forget to import the same dependency import { BrowserRouter, Route, Routes } from "react-router-dom"; 2. Below is the syntax to follow with v6 React Router. Example ; To render About as /about use path '/about' and Element= // Example--> ================================================================================ Except these everything works as shown by Harry. Don't forget to Use Link and To which is shown in the video. Pasting return() part from App.js as reference ============================================================================= return ( ); ------------- Hope this helps.
@out155
@out155 Жыл бұрын
Thanks so much
@hariprasad467
@hariprasad467 Жыл бұрын
Thanks Bhai.
@ayushagrawal4572
@ayushagrawal4572 Жыл бұрын
Thank you Brother
@civilengg8285
@civilengg8285 Жыл бұрын
Bhai white screen show ho rhi hai ab bhi kya kru
@Mathematics-v1n
@Mathematics-v1n Жыл бұрын
Bhai lekin about me Mai Jaa nahi Raha hoon
@yasirahmed73
@yasirahmed73 3 жыл бұрын
literally i am totally blank and dont know how to thank you,, just wanna say that whatever i will be credit goes to you ... thank you Sir .. love from Pakistan ♥️
@kraw-vo4oy
@kraw-vo4oy 10 ай бұрын
brilliant :) ... this is 1st first time I doing react... and this channel is the best platform on KZbin to learn :)
@dinesht3589
@dinesht3589 Жыл бұрын
For anyone watching in May 2023, this is the updated React-16 syntax import "./App.css"; import Navbar from "./components/Navbar"; import TextForm from "./components/TextForm"; import About from "./components/About"; import React, { useState } from "react"; import Alert from "./components/Alert"; import { BrowserRouter, Route, Routes } from "react-router-dom"; function App() { const [mode, setMode] = useState(`light`); // Whether dark mode is enable or not const [alert, setAlert] = useState(null); const showAlert = (message, type) => { setAlert({ msg: message, type: type, }); setTimeout(() => { setAlert(null); }, 2000); }; // Toggle Dark Mode const toggleMode = () => { if (mode === `light`) { setMode(`dark`); document.body.style.backgroundColor = "#020334"; showAlert(`Dark mode has been enabled`, "success"); document.title = "TextUtils - Dark Mode"; } else { setMode(`light`); document.body.style.backgroundColor = "white"; showAlert(`Light mode has been enabled`, "success"); document.title = "TextUtils - Light Mode"; } }; return ( ); } export default App; ------------------------------------------------------------------------------------------------------------------------ Navbar.js import React from "react"; import PropTypes from "prop-types"; import { Link } from "react-router-dom"; export default function Navbar(props) { return ( {props.title} Home {props.aboutText} {/* Enable Dark Mode */} DarkMode {/* Search Button */} Search ); } Navbar.propTypes = { title: PropTypes.string, aboutText: PropTypes.string };
@PrateekMaurya-se4xi
@PrateekMaurya-se4xi Жыл бұрын
Thank you Bhai ❤️❤️
@parthabhuyan7602
@parthabhuyan7602 Жыл бұрын
Thanks a lot man
@dinesht3589
@dinesht3589 Жыл бұрын
@@PrateekMaurya-se4xi welcome
@dinesht3589
@dinesht3589 Жыл бұрын
@@parthabhuyan7602 welcome
@Likhit_by_me
@Likhit_by_me Жыл бұрын
Thank you for this, was stuck in this for hours.
@__sora__.
@__sora__. 3 жыл бұрын
I love this ending "Thank you so much guys for watching this video and I will see you next time....."
@khrsgr
@khrsgr 3 жыл бұрын
music also
@anshikaapaliwal
@anshikaapaliwal 2 жыл бұрын
For who so ever has made it till here, might find a blank screen appearing when compiling, so help yourself by making the changes as indicated below: First import: import { BrowserRouter, Routes, Route, Link } from "react-router-dom"; Then, < Route path="/" element= {} /> The issue is due to upgradation of React router from v5 to v6.
@mgyoutube1885
@mgyoutube1885 2 жыл бұрын
what do i need to import..is it the same code as in video or anything else?
@chinmayi5215
@chinmayi5215 2 жыл бұрын
@@mgyoutube1885 No! import { BrowserRouter, Routes, Route, } from "react-router-dom";
@vsaurabh7879
@vsaurabh7879 2 жыл бұрын
Blank page open ho rha hai har bar..koi solution do plz
@chinmayi5215
@chinmayi5215 2 жыл бұрын
@@vsaurabh7879 Try this import { Link } from 'react-router-dom'; About So basically you cannot use to="" as used in href tag but you can use to={' '}
@yash_______105
@yash_______105 2 жыл бұрын
​@@vsaurabh7879 bro check the case of 'L' in importing link and html link tag
@TheComputerScience09
@TheComputerScience09 3 жыл бұрын
LOVE YOU SIR APKE SABHI COURSE SE MERA PAISA AUR TIME WEST NAHI HUAA THANKS HARRY SIR DIL. SE ❤️ LOVE YOU
@COFFY_GAMING
@COFFY_GAMING 3 жыл бұрын
Shi kha bro
@TheComputerScience09
@TheComputerScience09 3 жыл бұрын
Ha Bhai PYTHON Academy Nagpur Me Python Ka Basic Ka Course 10000Rs Hai Price Lekin Mai CodWithHarry ka Video Se Mai Sabhi Kuch Sikha Gaya Ho ❤️
@mohdzaheenafzal5103
@mohdzaheenafzal5103 Жыл бұрын
Best playlist on Internet ,far better than any paid course💯
@prajwalladkat
@prajwalladkat 3 жыл бұрын
you are revolutionizing India's Future sir thanks for providing this valuable material for free.
@udaywahi
@udaywahi 3 жыл бұрын
Bhai course bhale hi hindi me ho lekin aapne bhi macha diya aise concepts koi itna time invest karke nhi sikhata free me love you bro ♥️♥️
@soumelee5661
@soumelee5661 Жыл бұрын
🎯 Key Takeaways for quick navigation: 00:00 🌐 React Router enables single-page application (SPA) behavior, preventing page reloads for smoother navigation. 02:21 React Router allows components to change dynamically without reloading the entire page, improving user experience. 03:17 React Router DOM is a package used for routing in React applications, facilitating smooth and fast navigation. 05:43 Replacing anchor tags (`a` and `href`) with React Router's `Link` and `to` components prevents page reloads, making navigation faster and smoother. 11:03 Using `exact` with route paths ensures precise matching in React Router, preventing unexpected rendering of components. Made with HARPA AI
@helloworld2740
@helloworld2740 3 жыл бұрын
i love this starting 1:01
@sakshamjoshi1118
@sakshamjoshi1118 3 жыл бұрын
Thank you Harry for this awesome React course ❤️❤️🔥
@onkar10046
@onkar10046 2 жыл бұрын
Thapa technical ka video dekho better hai. Sidhi baat no bakwas
@aniketkumar3910
@aniketkumar3910 2 жыл бұрын
Sir todo list es playlist me h kya
@summitrawat1093
@summitrawat1093 2 жыл бұрын
@@onkar10046 bhai tumne cover kar liya react pura course ?
@DigitalAndTradingSolutions
@DigitalAndTradingSolutions Жыл бұрын
harry bhai has already pinned the solution comment which is really working and should work for everyone
@TheComputerScience09
@TheComputerScience09 3 жыл бұрын
YOUR Are Best Teacher Thanks You Harry Sir 😘😘😘
@hassaanistic
@hassaanistic 2 жыл бұрын
For anyone watching in June 2022 , this is the updated React-16 syntax got stuck for about 3 hours now it works
@surbhibhardwaj7289
@surbhibhardwaj7289 2 жыл бұрын
thankyou so much
@entry0693
@entry0693 2 жыл бұрын
Thanks your 3 hrs saved my 3 hrs 😂 🇳🇵
@chanchalsolanki2349
@chanchalsolanki2349 2 жыл бұрын
Thanks
@chanchalsolanki2349
@chanchalsolanki2349 2 жыл бұрын
I added this code and there is no error in the terminal but still my webpage is not visible. I didn't find the issue . please help me
@hassaanistic
@hassaanistic 2 жыл бұрын
@@chanchalsolanki2349 make Sure You import all the Things Perfectly with correct spellings as well
@pranjalpagaria322
@pranjalpagaria322 2 жыл бұрын
If you are having switch and black screen wali problem then just do this and try to understand -> (you have to import this) import { BrowserRouter as Router, Routes, Route, Link } from "react-router-dom"; And then you dont have to use switch use this -> just this and I hope your problem will be solved.
@vaibhavagrawal6702
@vaibhavagrawal6702 2 жыл бұрын
I have done everything but in my terminal this is showing opensslErrorStack: [ 'error:03000086:digital envelope routines::initialization error' ], library: 'digital envelope routines', reason: 'unsupported', code: 'ERR_OSSL_EVP_UNSUPPORTED'
@khushaliporwal2582
@khushaliporwal2582 2 жыл бұрын
@@vaibhavagrawal6702 In package.json file, change start and build as below in scripts- "start": "react-scripts --openssl-legacy-provider start", "build": "react-scripts --openssl-legacy-provider build",
@vaibhavagrawal6702
@vaibhavagrawal6702 2 жыл бұрын
@@khushaliporwal2582 thank u so much ,,, now it is working
@harshitpahuja7186
@harshitpahuja7186 2 жыл бұрын
@@khushaliporwal2582 same problem solved now thanx a lot🥰
@RahulYadav-nx5bl
@RahulYadav-nx5bl 2 жыл бұрын
galat hai bhai tera do this instead.
@welisten2242
@welisten2242 2 жыл бұрын
It works______________________ return ( );
@punjabirock754
@punjabirock754 2 жыл бұрын
Boommm✌️❤️
@sayyedmaroof5051
@sayyedmaroof5051 3 жыл бұрын
this was awesome harry bhai aaj aapne nayi chiz sikhayi
@bala-nachoto-dekhi9466
@bala-nachoto-dekhi9466 Жыл бұрын
A little modification. In react router v6, the routing will be like below: import { BrowserRouter as Router, Routes, Route, Link } from "react-router-dom";
@RAM_LALA
@RAM_LALA Жыл бұрын
bhai npm react-router-dom bhi kahn hi chal raha hai
@rohansingh8819
@rohansingh8819 Жыл бұрын
but ye chiz documentation me kyu nhi h website ke?
@sarimkhan9897
@sarimkhan9897 Жыл бұрын
ha yarr documentation se kuch samajh hi nhi aa raha
@rohansingh8819
@rohansingh8819 Жыл бұрын
@@sarimkhan9897 bhai tera hua kya? Mera to Jab main "Link to" use kar raha hu to white page aa raha h bs😓
@ErMondeep
@ErMondeep Жыл бұрын
@@rohansingh8819 Bhailog.. let's make a group to discuss these doubts!
@harshitavyas7497
@harshitavyas7497 Жыл бұрын
This course is mind-blowing. How can someone teach so nicely 😅
@abhinavshukla5628
@abhinavshukla5628 2 жыл бұрын
For anyone watching in October 2022, this is the updated syntax: import { BrowserRouter, Routes, Route } from "react-router-dom";
@theshaquib1030
@theshaquib1030 2 жыл бұрын
thanxs bro
@ayushishukla6912
@ayushishukla6912 2 жыл бұрын
it is showing blank screen , please share the solution
@ThomasShelby-s1q
@ThomasShelby-s1q 2 ай бұрын
4 year of coding still harry Bhai channel and its comment section help me. COMMUNITY OF CODERS WE MEET AGAIN ❤️
@user-ashokkumar001m
@user-ashokkumar001m Ай бұрын
Kya huaa bro 2024 me Sikh rha hai kya 😂
@santoshsonar9983
@santoshsonar9983 3 жыл бұрын
This React course is very helpful...🔥🔥🔥
@summitrawat1093
@summitrawat1093 2 жыл бұрын
bhai tumne complete kr liya y react course ?
@nextleveltech267
@nextleveltech267 Жыл бұрын
Lot of love and Thanks for the Knowledge you shared❤️❤️❤️
@Deepakdabaria11
@Deepakdabaria11 3 жыл бұрын
This react course is helpfull😍
@Gymbrozz99
@Gymbrozz99 3 жыл бұрын
Mai Aa gya Bhaiya apka Video Dekhne Love You ❤️
@rajkumarm526
@rajkumarm526 3 жыл бұрын
6/5 This course is awesome
@TechTalkXplore
@TechTalkXplore 3 жыл бұрын
Harry Sir = Save Money 💰 and Time ⌚ Love You Sir ❣️
@niteshkumarsingh1450
@niteshkumarsingh1450 8 ай бұрын
Jiske mein bhi "dispatcher in null" error aa raha h Step1: npm install react-router-dom@6 command vs code ke terminal mein run krna kyunki version 5 ki video hai ye uske baad update mein version 6 aa gaya tha Step2: ko replace kia gaya se to apne code mein ye change krlo Step3: Ek baar code editor restart kro Step4: Stack overflow mein ya copilot/chatgpt pe error check kro Step5: Syntax of react router is changed, look in docs for correct ones Step6: Anlom Vilom karo PS: Step1 worked for me Solution April 2024
@WasyOfficial
@WasyOfficial Жыл бұрын
Great! Your Teaching Style Seriously Awesome! Ek request hai aap se, ek video aap apne code with herry ko designing kaise kiya hai sirf struction ko samjha dijiye
@yasjudanulislam8908
@yasjudanulislam8908 2 жыл бұрын
Switch has been replaced with routes here's the code
@sayedh5948
@sayedh5948 2 жыл бұрын
Thanks a lot ♥️
@shekharhans1644
@shekharhans1644 2 жыл бұрын
Thanks a lot bro....
@RahulYadav-nx5bl
@RahulYadav-nx5bl 2 жыл бұрын
galat hai bhai tera do this instead.
@nitinthakur_01
@nitinthakur_01 2 жыл бұрын
Thanks 😊
@sapnajha7222
@sapnajha7222 Жыл бұрын
But why?
@anonymousgerman2809
@anonymousgerman2809 2 жыл бұрын
Thankyou harry bhai apne bot ache tarah se samajaya
@nayeemurrahman485
@nayeemurrahman485 3 жыл бұрын
I was trying to learn React for a long time. But in every tutorial series I've watched, I couldn't understand anything but some basics. Thank you very much.❤️
@nikolasteslaidol1796
@nikolasteslaidol1796 2 жыл бұрын
Same
@codeabhi8696
@codeabhi8696 Жыл бұрын
This is the best course. Thankyou Harry bhaiya😍
@sabajaved2035
@sabajaved2035 Жыл бұрын
For anyone implementing in 2023: App.js: import { Routes, Route, } from "react-router-dom"; return ( ); Navbar.js: import { Link } from 'react-router-dom'; replace the lis with the following: Home {props.aboutText} index.js: root.render( );
@Heroic767
@Heroic767 9 ай бұрын
Viewing this code today 26-March-2024 there are only 2 changes import using this import { BrowserRouter, Routes, Route } from 'react-router-dom'; Routing return ( );
@rahulvb27
@rahulvb27 4 ай бұрын
Thank you!
@ManishKumar-cs8zv
@ManishKumar-cs8zv 3 ай бұрын
Thank u 🎉❤
@Digitaltechnologieshere
@Digitaltechnologieshere 3 ай бұрын
​@@rahulvb27 i am more thankful for appreciation brother.. Being from Pakistan learning react from harry sir
@Digitaltechnologieshere
@Digitaltechnologieshere 3 ай бұрын
​@@ManishKumar-cs8zv stay blessed bro
@sukhera89
@sukhera89 2 жыл бұрын
if you are learning it in October 2022,, this is how we use router --step 1 : go to terminal and run --> npm install react-router-dom --step 2 : import router in App.js like this import { BrowserRouter as Router, Route, Routes } from "react-router-dom"; --step 3: //in place of
@Faizan-mb2lm
@Faizan-mb2lm Жыл бұрын
Here is updated syntax for routing : App.js : import './App.css'; import Navbar from './components/Navbar'; import Textform from './components/Textform'; import About from './components/About'; import Alert from './components/Alert'; import { useState } from 'react'; // import { BrowserRouter as Router, Route, NavLink } from 'react-router-dom' import { BrowserRouter, Route, Routes } from "react-router-dom"; function App() { const toggleMode=()=>{ if(mode==='dark'){ setDarkMode('light') document.body.style.backgroundColor="white" document.body.style.color="black" } else { setDarkMode('dark') document.body.style.backgroundColor="#03001C" document.body.style.color="white" } } const showalert=(message,type)=>{ setalert({ msg:message, type:type,// type is in bootstrap }); // Clear the alert after a certain period setTimeout(() => { setalert({}); }, 2000); } const [alert, setalert] = useState({}) const [mode, setDarkMode]=useState('light'); // dark is enable or not return ( ); } export default App; Navbar.js: // component file name 1st letter must be capital alwayss import React from 'react' import { Link } from 'react-router-dom'; export default function Navbar(props) { return ( {props.title} Home About Enable Mode ) }
@vibudhrathore
@vibudhrathore Жыл бұрын
blank screen aa rha
@Faizan-mb2lm
@Faizan-mb2lm Жыл бұрын
@@vibudhrathore this is just syntax of routing try this syntax on your code
@rupeshvanneldas27
@rupeshvanneldas27 Жыл бұрын
Thanks man
@Faizan-mb2lm
@Faizan-mb2lm Жыл бұрын
@@rupeshvanneldas27 you are welcome
@simcard2732
@simcard2732 Жыл бұрын
can't resolve 'react-router-dom' error aa raha hai
@GeekyShubhamSharma
@GeekyShubhamSharma 3 жыл бұрын
I was eagerly waiting for this video thanks harry bhai very nice video❤❤❤❤❤♥️♥️♥️
@mohituniyal7
@mohituniyal7 3 жыл бұрын
I would comment in every video till you don't reply. I am really thankful to you. I didn't have cs in 12th but learned programming c and CPP from your videos and still learning. Moreover, I got a confidence boost. Once again thank you for your efforts.
@b_107_satyakisaha6
@b_107_satyakisaha6 3 жыл бұрын
bro take some rest
@khrsgr
@khrsgr 3 жыл бұрын
keep it up! brother I am with you!
@KaisanFacts
@KaisanFacts 2 жыл бұрын
the best react course in the world
@INoob00b
@INoob00b 2 жыл бұрын
are you able to do react routing? please help me
@chinmayi5215
@chinmayi5215 2 жыл бұрын
For those who are getting blank page after using Link to Try this out: import { Link } from 'react-router-dom'; About So basically you cannot use to="" as used in href tag but you can use to={' '}
@SantoshDashTech
@SantoshDashTech 2 жыл бұрын
When I clicked in a link URL changed but that corresponding component is not displayed after refresh then it's work any solution please ....
@yogeshkumar-rm1ne
@yogeshkumar-rm1ne 2 жыл бұрын
@@SantoshDashTech is this problem occuring after use link to or without use of link to?????
@harshjha271
@harshjha271 2 жыл бұрын
still the page is blank what should i do?? please help
@yogeshkumar-rm1ne
@yogeshkumar-rm1ne 2 жыл бұрын
@@harshjha271 bro use the new syntax.......Use routes and import instead of switch ....like in the example.... import { BrowserRouter, Routes, Route, Link } from "react-router-dom"; Then, < Route path="/" element= {} /> The issue is due to upgradation of React from v5 to v6.
@harshjha271
@harshjha271 2 жыл бұрын
@@yogeshkumar-rm1ne actually the router tag should be in jsx tag on top and bottom in return function i put it after navbar closing tag that's why my page was blank.. I figured it out thanks for helping.
@footballbro2327
@footballbro2327 3 жыл бұрын
16 Videos on 5 Days, Harry Bhai is on Fire 🔥🔥
@akshatasticvlogs
@akshatasticvlogs 2 жыл бұрын
ATTENTION : HARRY DUE TO LATEST VERSION, WHATEVER YOU TOLD US IN THIS VIDEO IS NOT WORKING OUT AND MANY OF US ARE STUCK HERE, WE REALLY WANT TO COMPLETE THIS REACT COURSE SO PLS HELP US ...PLS MAKE SEPRATE VIDEO ABOUT THIS INSTALLATION AS PER NEW VERSION IT WILL BE REALLY REALLY HELPFUL 🤞
@soniyaagrawal1029
@soniyaagrawal1029 2 жыл бұрын
// This is a React Router v6 app import { BrowserRouter, Routes, Route, Link, Outlet } from "react-router-dom"; function App() { return ( ); }
@AryanSharma-dw9df
@AryanSharma-dw9df 2 жыл бұрын
@@soniyaagrawal1029 I am getting blank screens, when I used 'Link' 'to' in place of 'a' and 'href'. Before this change, it was working fine. Can you help me with this.
@vivekmaru2557
@vivekmaru2557 2 жыл бұрын
@@AryanSharma-dw9df bhai same any solution
@bekaarengineerr
@bekaarengineerr 2 жыл бұрын
@@vivekmaru2557 It gets resolved when you put the Navbar inside the router.
@fahadhussain137
@fahadhussain137 2 жыл бұрын
@@bekaarengineerr nhi horrha bhai router ke ander daaal ke bhi
@LEGENDX22
@LEGENDX22 3 жыл бұрын
Harry bhai always op me kalse w8 krraha tha video ka 🥺
@uditsharma5697
@uditsharma5697 2 жыл бұрын
don't know the problem but when i click on about i have to reload the page and then the content of the page changes to about and same for the home i have to reload the page manually whenever i click home or about
@shalinisingh4043
@shalinisingh4043 Жыл бұрын
Same problem I also have
@uditsharma5697
@uditsharma5697 Жыл бұрын
@@shalinisingh4043 I solved the problem with too much effort and searching now its your turn
@thinkandgain7
@thinkandgain7 2 жыл бұрын
Thanks Harry bhai for this react course. I am enjoying the course your method of teachinf is perfect. Love from Pakistan🤩
@rajatsingh8364
@rajatsingh8364 3 жыл бұрын
I aspire to be as helpful as he is to the world someday. Thanks Harry bhai!
@rajvanshi8
@rajvanshi8 Жыл бұрын
Harry bhai maza aa rha h😇😄 And little modification 19/04/2023
@shubhamkumarmandal2132
@shubhamkumarmandal2132 Жыл бұрын
Bhai ye mere me work nhi kar rha pt nhi kyun
@ashwathsaxena1192
@ashwathsaxena1192 Жыл бұрын
thanks bhai
@ashwathsaxena1192
@ashwathsaxena1192 Жыл бұрын
@@shubhamkumarmandal2132 code bhej apna
@shivakumarwarriors7964
@shivakumarwarriors7964 3 жыл бұрын
Love you Harry sir u re doing a great job always thankful to you for your great contribution 👍👏🙏🙏
@simple8810
@simple8810 3 жыл бұрын
Thank You Harry for complete series on react
@adwaitbokade2890
@adwaitbokade2890 3 жыл бұрын
amazing course big brother ! is next video coming today ? We made previous React project in bootstrap till now , can we built a small project without bootstrap 😎, tab 🔥 wali feeling ayegi
@GOPALDUBEYRA
@GOPALDUBEYRA 2 жыл бұрын
CORRECTION Replace {/* */} With AND import { BrowserRouter as Router, Routes, Route, Link } from "react-router-dom"; REASON -> UPDATE
@sahilsuman9588
@sahilsuman9588 Жыл бұрын
bro, i have done all these things but i am getting error like Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:
@dhruvdornal803
@dhruvdornal803 Жыл бұрын
Link is not working in Navbar it is not even displaying the whole page
@deeptidip9864
@deeptidip9864 Жыл бұрын
@@dhruvdornal803 iam also facing same problem.. did u get any solution
@krishgarg2806
@krishgarg2806 3 жыл бұрын
Thank you so much bhai. Maine about page mai dark mode integrate kar liya, upar nav bar mai wo bhi set kar diya ki jis page pe ho, uspe active wali class aa jae.
@adhithespeedster
@adhithespeedster 3 жыл бұрын
Syntax change in React 17. Instead of switch, routes is used and component is declared in element attribute inside route. function App() { return ( ); }
@ankushmaity2635
@ankushmaity2635 3 жыл бұрын
that was really helpful thanks!!!!!
@amarwavare711
@amarwavare711 3 жыл бұрын
Alternate solution : 1). Uninstall Previous Version- npm uninstall react-router-dom 2). Install Older version- npm install react-router-dom@5.2.0
@someshthapliyal6619
@someshthapliyal6619 3 жыл бұрын
Do i need to keep the link and to in the navbar?
@someshthapliyal6619
@someshthapliyal6619 3 жыл бұрын
@@ankushmaity2635 Bro is your working? and did you use the to and link in the navbar?
@SantoshKumar-vz6he
@SantoshKumar-vz6he 2 жыл бұрын
good work
@HammadAlamSiddique-yg1te
@HammadAlamSiddique-yg1te 3 жыл бұрын
jumma mubarak harry bhai
@suvigyabasnotra7378
@suvigyabasnotra7378 3 жыл бұрын
Error: 'Switch' is not exported from 'react-router-dom'. Stack Overflow couldn't solve this issue!
@playmaker159
@playmaker159 3 жыл бұрын
having the same issue
@khrsgr
@khrsgr 3 жыл бұрын
@@playmaker159 having the same issue
@khrsgr
@khrsgr 3 жыл бұрын
@@playmaker159 I fixed this.
@ARMotivation24
@ARMotivation24 3 жыл бұрын
Do This in Terminal Step 1: npm uninstall react-router-dom step 2: npm install react-router-dom@5.2.0 Step 3: npm run start Your Issue will be Fixed 😊
@trooperzooper6092
@trooperzooper6092 3 жыл бұрын
Just use Routes Instead of Switch , In version 6 Switch is replaced with Routes. Or install Old version of react-router-dom.
@tejaskumar4470
@tejaskumar4470 3 жыл бұрын
Awesome React Course 🔥😊
@rohittewari6902
@rohittewari6902 2 жыл бұрын
If you came across this error: export 'Switch' (imported as 'Switch') was not found in 'react-router-dom' (possible exports: BrowserRouter, HashRouter, Link, MemoryRouter, NavLink, Navigate, Outlet, Route, Router, Routes, UNSAFE_LocationContext, UNSAFE_NavigationContext, UNSAFE_RouteContext, createRoutesFromChildren, createSearchParams, generatePath, matchPath, matchRoutes, renderMatches, resolvePath, unstable_HistoryRouter, useHref, useInRouterContext, useLinkClickHandler, useLocation, useMatch, useNavigate, useNavigationType, useOutlet, useOutletContext, useParams, useResolvedPath, useRoutes, useSearchParams) Use this syntax: import { BrowserRouter as Router, Routes, Route } from "react-router-dom"; // Importing React Router Dom return ( ); Reason: If you are using react-router-dom v6+, then Switch is replaced with Routes. So you need to simply import routes and you can use it here. Also You Need to update Route declaration.
@biswabaral949
@biswabaral949 Жыл бұрын
still getting errors
@MohammadAhmad-i3n
@MohammadAhmad-i3n Жыл бұрын
Thanks a lot.
@ransilpinto8543
@ransilpinto8543 9 ай бұрын
Thank Bhai.. it works .. was stuck for 2 hours
@rohittewari6902
@rohittewari6902 9 ай бұрын
@@ransilpinto8543 ❤
@AMMARALABAD-g9y
@AMMARALABAD-g9y 11 ай бұрын
so beautiful so elegant just studying like a wow
@AJ_Tinku
@AJ_Tinku 3 жыл бұрын
hi guys React router has been updated so their are little changes so i changed little tags to get output got output I have made a change in App.js which is present in src folder import { Route, Routes, useRouteMatch, useParams } from "react-router-dom" && return ( // );
@omprakashshaw796
@omprakashshaw796 3 жыл бұрын
Error: useRoutes() may be used only in the context of a component.
@ajmeerkhja9379
@ajmeerkhja9379 Жыл бұрын
for those who are learing React js after feb 2023 there is a little change in santax in react-router-dom //also the following changes in navbar links Home About // the way to use {to} in Link is little change compared to this video as you can see above
@RecheckTech
@RecheckTech 3 жыл бұрын
Sir I need your help.I am from B. Tech background and my age is 25 now.. I don't have any experience due to my personal mistake to choose career path. But sir now I wanted do work as a Front end developer and hence I am seriously prepareing from your course of web developement to achieve these skills..Also I wanted to learn all the concept of Full stack development... Please sir guide me how can I get a good job from where I can build my skill. No matter what the salary is I want to join in any company who require these web development skill... My only question is that Is it really possible to get a job now without having any experience and how I should design my CV.. What type of projects should I do... Please sir reply me.. I am really worried now about my career.. Please sir guide my... I will do everything to get a job.. And I will learn every thing from ur course... Please sir make a video on this topic.. Or sir please give me a reply....
@rahulchilap6420
@rahulchilap6420 2 жыл бұрын
Bro relax. We are on the same boat and that journey of struggle is real in our case. Work hard and everything can be achieved.
@k31gamingtv
@k31gamingtv 3 жыл бұрын
Awesome video..thank you so much !!
@RajSingh-te1uo
@RajSingh-te1uo 2 жыл бұрын
Src: W3Schools
@Zohaib_AI
@Zohaib_AI Жыл бұрын
Thanks you So Much Thanks sir
@haroonrasheedpatel244
@haroonrasheedpatel244 2 жыл бұрын
Great Harry Bhai, u r best! let everyone know that Switch is changed to Routes
@Divyesh44
@Divyesh44 Жыл бұрын
The React router docs is so messed up and makes it really difficult for us beginners. Thanks to some of you to provide the updated version below. I've compiled the minimal changes you gotta make as of 25th july 2023. Update the changes and the rest of the code remains same. Try to understand the code more than copy pasting. App.js => import { BrowserRouter, Route, Routes } from "react-router-dom"; -- -- return ( ); Navbar.js : {props.title} // Title link Home // Textform link {props.about} // About link
@aayushmohite07
@aayushmohite07 Жыл бұрын
bhai muje abhi bhi same error arha hai,"Cannot read properties of null (reading 'useRef') with a blank screen.Tera code paste krne ke baad bhi solve nhi hua issue.Plz reply
@rahulgandhi5844
@rahulgandhi5844 Жыл бұрын
@@aayushmohite07same muje bhi aarha hai
@rahulgandhi5844
@rahulgandhi5844 Жыл бұрын
Bhai nhi ho rha hai
@LubnaKhan-vp7pd
@LubnaKhan-vp7pd Жыл бұрын
Thankuuuuuuuuuuuuu it worked!
@rahulgandhi5844
@rahulgandhi5844 Жыл бұрын
@@LubnaKhan-vp7pd mera nhi hua apka Kaise hua
@karunasagarks5228
@karunasagarks5228 2 жыл бұрын
this React course is Awesome Harry bhai ! please teach us Angular from scratch ! we need a playlist of Angular, Thank you very much, really appreciate your efforts for us !
@bhargavnadipineni9354
@bhargavnadipineni9354 2 жыл бұрын
My Link tag which is in navbar is not working.. if we use anchor tag the page is refreshing while it gets switched Home
@priyankasaini7204
@priyankasaini7204 Жыл бұрын
did you get any solution to this , please tell me , i searved everything but found nothing
@zuhaibulhassan.
@zuhaibulhassan. Жыл бұрын
Amazing tutorial Harry Sir 😍
@bdkfeel482
@bdkfeel482 3 жыл бұрын
You are great sir I am learning this course It was helpful
@lakshrao2376
@lakshrao2376 Жыл бұрын
while installing react router dom this error will come up to date, audited 1512 packages in 2s 238 packages are looking for funding run `npm fund` for details 6 high severity vulnerabilities To address all issues (including breaking changes), run: npm audit fix --force Run `npm audit` for details. anyone know how to resolve this
@jawedhawari6927
@jawedhawari6927 11 ай бұрын
npm audit fix --force run kiya uske baad, npm start kam nhi kr raha.
@kirtiiyer490
@kirtiiyer490 3 жыл бұрын
Fantastic video harry sir 😍
@lilwayne6037
@lilwayne6037 3 жыл бұрын
React Router version 6 is out and your part 16 on this course is kind of broken now... Please update the video if possible. @CodeWithHarry
@summitrawat1093
@summitrawat1093 2 жыл бұрын
bhai react ka course complete kr liya tumne ???
@OREVA.
@OREVA. Ай бұрын
For anyone watching in 2024, this is the Updated Syntax: return ( ); } export default App;
@DevDynamo-me
@DevDynamo-me 2 жыл бұрын
has been updated with in version 6. If you getting any problem or error use the code below:
@bishalgurung8071
@bishalgurung8071 2 жыл бұрын
thanks bro😊
@yash_______105
@yash_______105 2 жыл бұрын
any changes in link?
@gauravsinghjethuri5405
@gauravsinghjethuri5405 2 жыл бұрын
so much thanks broo😊
@DevDynamo-me
@DevDynamo-me 2 жыл бұрын
@@yash_______105 No changes to link
@dibyajyotimondal7011
@dibyajyotimondal7011 3 жыл бұрын
I was waiting for your video
@thenadastudio8295
@thenadastudio8295 2 жыл бұрын
React router dom syntax has been changed in React version greater than 6.2.0 you cannot use Switches and it has been replaced by Routes , So we have to import Import {BrowserRouter as Router, Routes , Route, Link} from 'react-router-dom' And replace from
@vishalmankar4969
@vishalmankar4969 2 жыл бұрын
Thia react course is very helpful
@AnilYadav-qn3ch
@AnilYadav-qn3ch 2 жыл бұрын
thank harry I have solved the problem of version ^6.4.3 import this import {BrowserRouter, Routes, Route,} from "react-router-dom";
@PriyanshuSingh-hm4tn
@PriyanshuSingh-hm4tn Жыл бұрын
GREAT VIDEO!
@razahussain7413
@razahussain7413 3 жыл бұрын
SIR ab ye router react dom purana ho gya hai plz nye recat dom k liye ek post kijiye harry bhai
@pratyushpradhan1844
@pratyushpradhan1844 3 жыл бұрын
+1
@khrsgr
@khrsgr 3 жыл бұрын
@@pratyushpradhan1844 I fixed this.
@pratyushpradhan1844
@pratyushpradhan1844 3 жыл бұрын
Instead of using Switch import routes and use routes in place of switch keyword. And with the help of element tag put your about component inside it. This will fix the issue
@msbasera
@msbasera 2 жыл бұрын
Awesome bhai ❤️
@thebabayaga9105
@thebabayaga9105 2 жыл бұрын
React router changes the url but not the view
@arsh2935
@arsh2935 2 жыл бұрын
yeah facing the same issue
@arsh2935
@arsh2935 2 жыл бұрын
were you able to solve this?
@JoydipRoychowdhury-k3g
@JoydipRoychowdhury-k3g 4 ай бұрын
Harry Bhai. Perhaps you have not seen my previous query. I am stuck on this point. However,.React-router-dom some modification. Switch is no longer used after React version 6. It should be imported { BrowserRouter as Router, //Switch, Routes, Route, Link } from "react-router-dom";
@Anukarshrajsingh
@Anukarshrajsingh 2 жыл бұрын
If you are using react-router-dom v6 and above, then this is the updated syntax:
@shubhamtanwar679
@shubhamtanwar679 2 жыл бұрын
And what about Link {props.About} i'm using this but blank page is showing. what to do now help!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!help!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!help!!!!!!!!!!!!!!!!!!!!!!!!!
@learnerboy4405
@learnerboy4405 2 жыл бұрын
Thankyou Very Much.....
@sagarbalamwar
@sagarbalamwar 2 жыл бұрын
Thank you so much man i stuck here so much thanks for the help
@shi-nee7966
@shi-nee7966 3 жыл бұрын
For the algorithem. Altho i bought a course on udemy before this course started but i know harry bhai's the best. So im liking and commenting on every video for the algo.
@Hamzaali-uw5hu
@Hamzaali-uw5hu 2 жыл бұрын
give me a website link of react router dom please
@prashantsingh-oy8go
@prashantsingh-oy8go Жыл бұрын
For anyone watching now, Syntax has been updated. Now instead of Switches import Routes import{ BrowserRouter as Router, Routes, Route, Link } from "react-router-dom";
@017_indrasen9
@017_indrasen9 Жыл бұрын
Can you please give the link from where you have taken this code
@parthbendre7607
@parthbendre7607 2 жыл бұрын
After doing exactly same as done in video. Don't know why but my site is going blank.
@hostile_user
@hostile_user Жыл бұрын
Have you solve the problem? Facing the same problem too
@vivekmeena4551
@vivekmeena4551 Жыл бұрын
@@hostile_user me tooo i have facing this over a long time
@sonudangi8686
@sonudangi8686 Жыл бұрын
@desiboi2559 i am also facing this problem
@sonudangi8686
@sonudangi8686 Жыл бұрын
@desiboi2559 but i am got it
@architgupta6741
@architgupta6741 2 жыл бұрын
thank you harry bhai..🤙👏🙏
@deepanshugoyal1250
@deepanshugoyal1250 2 жыл бұрын
Harry Bhai,< Link/> use kar rahu hu but url to change ho jata hai, but render nahi hota component . plz help I am making eshop website..
@deepanshugoyal1250
@deepanshugoyal1250 2 жыл бұрын
I got solution that I was using Strictmode but after removing it it is working
@sagarpatel3352
@sagarpatel3352 2 жыл бұрын
yes same issue 'Link' is defined but never used ..... any solution bro??
@vintagex4350
@vintagex4350 Жыл бұрын
​@@sagarpatel3352 bhai link wala solution Mila ho to bta do bhai
@priyankasaini7204
@priyankasaini7204 Жыл бұрын
@@sagarpatel3352 please help
@harshjaiswal1634
@harshjaiswal1634 3 жыл бұрын
Bhai maza aa gaya
@nishkarshjain5684
@nishkarshjain5684 3 жыл бұрын
I encountered with an error. Though I follow the video lecture thoroughly. ERROR : Switch is not exported from "react-router-dom"... If any one Know how to remove it... Plz dm me 👍🏻👍🏻👍🏻
@Shubham_Maurya_001
@Shubham_Maurya_001 3 жыл бұрын
same here
@Shubham_Maurya_001
@Shubham_Maurya_001 3 жыл бұрын
have you got the solution
@nishkarshjain5684
@nishkarshjain5684 3 жыл бұрын
@@Shubham_Maurya_001 Not yet bro.
@Truth_Seeeker
@Truth_Seeeker 3 жыл бұрын
React-router-dom is updated to v6 im also in a problem cant use this syntax
@taranpreetsingh1424
@taranpreetsingh1424 2 жыл бұрын
Use like this It will definitely not show an error
@jeevankurian9148
@jeevankurian9148 Жыл бұрын
Thank You
@ankukushwaha1098
@ankukushwaha1098 Жыл бұрын
Thank you so much
@KaheBtaye
@KaheBtaye Жыл бұрын
@@ankukushwaha1098 bhai apka ho gya ho toh mujhe bi bta do kaise hoga
@afizahaq135
@afizahaq135 3 жыл бұрын
I am learning react from you very nice course❤️
@harismehboob3557
@harismehboob3557 2 жыл бұрын
Those using new version of npm some things have been changed as Switch replaced with Router. So this code may help return ( );
Wednesday VS Enid: Who is The Best Mommy? #shorts
0:14
Troom Oki Toki
Рет қаралды 50 МЛН
Counter-Strike 2 - Новый кс. Cтарый я
13:10
Marmok
Рет қаралды 2,8 МЛН
React router crash course
1:04:35
Chai aur Code
Рет қаралды 343 М.
Node Js Tutorial in Hindi 🔥🔥
1:48:50
CodeWithHarry
Рет қаралды 1,9 МЛН
React Router Tutorial in Hindi | React Router Dom in Hindi in 2020 #56
25:23
Every React 19 Feature Explained in 8 Minutes
7:35
Code Bootcamp
Рет қаралды 148 М.
React Router DOM | How to use it
21:12
Sofia Goyal
Рет қаралды 27 М.
Complete Git and GitHub Tutorial for Beginners
1:15:22
Apna College
Рет қаралды 3,5 МЛН
All about Routing in React 2024
41:49
CodeHelp - by Babbar
Рет қаралды 30 М.
Wednesday VS Enid: Who is The Best Mommy? #shorts
0:14
Troom Oki Toki
Рет қаралды 50 МЛН