Interactive Powerpoint_How to Master effective communication
Â
routing.pptx
1. React Router
âą React Router is an open-source application programming
interface (API)/standard library for Routing in React apps. It
helps routers create and navigate among different website
URLs that build your web app.
âą They are for simplifying site navigation and enabling users to
roam between the components of a web application while
preserving the state.
2. âą React Routers use dynamic and client-side routing; everything
is a component in React Router while your app is rendering.
âą It helps support creating a single-page web application (SPA)
while requiring no page refreshing when the user navigates.
âą These Routers can also provide unique URLs for all active web
app components, making them more shareable.
3. Various Packages in React Router
Library
âą React Router library comes with three different packages
concerning npm, and each has its purpose â
âą react-router-dom
âą react-router
âą react-router-native
âą The react-router package is for peer dependency to the other two
packages mentioned above.
âą For React apps, the react-router-dom package is used for
routing. And the react-router-native comes with bindings that
ones use for developing React Native apps.
12. âą use of nested routes in v5 that requires strict string matching logic.
However, in the new version (v6) they have eliminated the need for
the string matching logic and useRouteMatch() as shown below.