Mastering React Router DOM for Client-Side Routing

Day 16 / 21 Learning Challenge Today I learned how routing works in React using React Router DOM. Study Time: 4 hours Key Learnings: • React Router DOM for client side routing • BrowserRouter, Routes, and Route setup • Navigation using Link without page reload • Dynamic routing using useParams • Nested routing and Outlet • Handling invalid routes using 404 page What I Learned React Router DOM helps create multiple pages inside a single page application. It updates only the required component without refreshing the browser. Core Concepts • BrowserRouter wraps the app and enables routing • Routes contains all route definitions • Route connects URL path with component • Link handles navigation without reload Dynamic Routing Used when URL contains variable data. Example: /user/101 useParams reads values from URL. Nested Routing Used for complex layouts like dashboards. Parent route contains child routes. Outlet renders child components inside parent layout. 404 Route Used when no route matches the URL. Path "*" catches all invalid routes and shows a Not Found page. Practice Done • Set up basic routing with multiple pages • Navigated between pages using Link • Created dynamic routes using useParams • Implemented nested routing with Outlet • Added 404 page for invalid routes Challenge Faced Understanding nested routing and how Outlet renders child components. Solution Applied Built small examples and tested route behavior step by step. Today’s Outcome Clear understanding of how React handles navigation without page reload. Progress So Far • Topics covered: HTML, CSS, JavaScript, DOM, OOP, Async JavaScript, Git, Project, React basics, Props, State, useState, React Events, Two Way Binding, Local Storage, React Fragments, CSR, SSR, Axios, useEffect, React Router DOM Biggest Learning Today React Router enables smooth navigation and improves user experience in web applications. Sheryians Coding School Sheryians Coding School Community #ReactJS #WebDevelopment #JavaScript #FrontendDevelopment #CodingJourney #LearningInPublic #21DaysChallenge #BuildInPublic

  • graphical user interface

To view or add a comment, sign in

Explore content categories