React Router Dom v6+ Tutorial in Hindi
जब भी हम किसी React ऐप्लिकेशन में multiple pages को दिखाना चाहते हैं, तो हमें React Router Dom का इस्तेमाल करना पड़ता है। यह आर्टिकल आपको बताएगा कि कैसे आप अपने React ऐप्लिकेशन में React Router Dom को एड कर सकते हैं और उसका इस्तेमाल कर सकते हैं।
पहला कदम: रिऐक्ट ऐप्लिकेशन में React Router Dom को इंस्टॉल करें
सबसे पहले, आपको अपने टर्मिनल में जाकर निम्नलिखित कमांड चलानी होगी:
npm install react-router-dom
दूसरा कदम: ऐप्लिकेशन में नेविगेशन कंपोनेंट बनाएं
आप अपने ऐप् की नेविगेशन के लिए एक अलग कंपोनेंट बना सकते हैं जिसमें आप सभी रोटे कम्पोनेंट को लिंक कर सकते हैं और उनके लिए रूट बना सकते हैं।
तीसरा कदम: रूट कंपोनेंट में स्विच और रूट कंपोनेंट बनाएं
रूट कंपोनेंट में आप स्विच कंपोनेंट का इस्तेमाल करके अपने रूट्स को बना सकते हैं जिसमें आप सभी पेज कंपोनेंट्स को इन्पुट दे सकते हैं।
चौथा कदम: रूट आईंडेक्स.जेएस में नेविगेशन कंपोनेंट का इस्तेमाल करें
अंत में, आप रूट आईंडेक्स.जेएस में अपनी नेविगेशन कंपोनेंट का इस्तेमाल करके अपने ऐप् के नेविगेशन को बना सकते हैं।
उम्मीद है कि यह आर्टिकल आपको रीऐक्ट ऐप्लिकेशन में React Router Dom को एड करने के तरीके के प्यारे हुए कारकों या प्रक्रिया को समझने में मदद करेगा।
great work keep doing it bro……
thank you bhaiya
Thanks for this helpful tutorial bro…
Exactly looking for this. Thanks!
thanks bhai
Notice : in v5 <Route exact path='/' element={<Home>}/} but little change in new version
in v6 <Route path='/' element={<Home>}/} // exact is not exist in v6
Thanks, Bro, helped a lot👍
Thanks brother, i search it for three hour but this tut help me to complete my task. your way of teaching is simple and amazing
Thank a lot for this awesome tutorial bro. it was really helpful
Good 😊❤
thank a lot brother
Love you this video is very helpful great job jani♥️
It was very helpfull for me,
i install latest react-router-dom version using cntrl + CC (press two time c) then give command npm i react-router-dom.
Dynamic Routing pe video banao
Big love sir <3
Brother konsa plugin use kar rhe the aap Last wale ko automatically change karwane ke liye
thanks a lot
too good,, thanks for the tutorial <3
Sir i get an error home page always show when i click on about page then home page phir bhi show ho rha hai
Thank you so much …Well explained