How to use react-router-dom in React Js - Headless WordPress with React | Ep 9
#reactjs #reactrouter #dom In this video, We have learned how to install and use react-router-dom in react project. The primary functionality of react-router-dom is implementing dynamic routing in web applications. Based on the platform and the requirements of the application, react-router-dom supports component-based routing, which is the ideal solution for routing if the React application is running on the browser. BrowserRouter is a parent component in react-router-dom that stores all the other route components. Allowing the declaration of individual routes is the main functionality of using BrowserRouter in the application. Routes is a new component introduced in v6 that replaces the switch component. (Switch renders a route exclusively as it displays the first child route that matches the current URL). Route is the child component that renders a specific UI component when the URL matches the specified path. The path attribute specifies the path name we assign to the component and the element attribute refers to the component to render when the URL matches. Links, As its name suggests, Link allows a user to navigate to another page by clicking on it. For instance, you can use it when creating the application’s navigation bar. It is possible to add inline styling to this component. JavaScript (ES6) tutorials Playlist:- https://youtube.com/playlist?list=PLa9NMvQUMD5dUBOwBnyF85a1w1ITXDMXG ## Resources React Router DOM: https://www.npmjs.com/package/react-router-dom GitHub: https://github.com/tanujpatra228/youtube/tree/headless-wordpress-react-js == Social Media == LinkedIn:- https://www.linkedin.com/in/tanujpatra/ Facebook:- https://www.facebook.com/itswebspace/ Video Timestamp:- 00:00 - What we are doing in this Video 00:23 - Install react router dom using NPM 01:07 - Structure of React Router DOM 03:52 - Start using React Router DOM 05:15 - Using Routes and Route components 07:56 - File structure to follow in small React projects 12:00 - Creating Navbar component 14:05 - Link component in React Router DOM
Download
0 formatsNo download links available.