React Router DOM
(https://reactrouter.com/en/6.9.0/)
use Tailwind CSS
(https://tailwindcss.com/docs/guides/create-react-app)
create react router npm i react-router-dom
(https://www.npmjs.com/package/react-router-dom)
React Router
- BrowserRouter add in index.js and inside it replace App.
- Route write inside the Routes in the App.js
- Write attribute likes path and element in the route.
- Write extra Route for unknown direction its path is *.
- Link use Instead a tag. for custom Link use NavLink.
use
- For button click use useNavigate func. its alternative is Link.
- useParams use for getting dynamic value or key.
- Outlet should be used in parent route elements to render their child route elements.