,

Adding React Router in a React App 2023: A Step-by-Step Tutorial with React Router Dom v6+ in Hindi

Posted by

How to Add React Router in React App 2023

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 को एड करने के तरीके के प्यारे हुए कारकों या प्रक्रिया को समझने में मदद करेगा।

0 0 votes
Article Rating
44 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
@Artist._.
9 months ago

great work keep doing it bro……

@Manga4u585
9 months ago

thank you bhaiya

@naveengupta101
9 months ago

Thanks for this helpful tutorial bro…

@mnd7381
9 months ago

Exactly looking for this. Thanks!

@VIPUL27
9 months ago

thanks bhai

@baraiyasachin9166
9 months ago

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

@subhamjena5160
9 months ago

Thanks, Bro, helped a lot👍

@mrjazi4541
9 months ago

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

@amaanhussain3557
9 months ago

Thank a lot for this awesome tutorial bro. it was really helpful

@saloskilo
9 months ago

Good 😊❤

@yuvinnavod392
9 months ago

thank a lot brother

@jounabbas6248
9 months ago

Love you this video is very helpful great job jani♥️

@jitendraverma1603
9 months ago

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.

@aatifkhan6042
9 months ago

Dynamic Routing pe video banao

@sameerbutt0fficial285
9 months ago

Big love sir <3

@4rjunkum4r-1
9 months ago

Brother konsa plugin use kar rhe the aap Last wale ko automatically change karwane ke liye

@ashvarygidian1996
9 months ago

thanks a lot

@AbhishekSingh-vl1dp
9 months ago

too good,, thanks for the tutorial <3

@shanukulshrestha566
9 months ago

Sir i get an error home page always show when i click on about page then home page phir bhi show ho rha hai

@analysisunplugged
9 months ago

Thank you so much …Well explained