- npm i react-router-dom
- detail on documentation of react-router-dom
- Link tag is equal to a tag
- a tag refresh the page so in reactwe use link which don't refresh the page
- link atribute us to=""
- NavLink is similar to Link but have extra feature like isActive can use for identify if the url is active or not
- for router dom you need to give main app the with the prop otherwise it will not work, so you need to create router constant and put the value of createBrowserRouter.
- there are twoo ways of doing routing check in main.jsx file.
- can help in changing the page on same file see in Layout.jsx
- with the help of loader better optimization happen than useEffect . it fetch the api before the clicking just by hovering and also save it in cache.
-
Notifications
You must be signed in to change notification settings - Fork 0
Oroxhimaru/React-Router-Project
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
Project is based on react router dom, with useParams and userLoaderData hooks. and the use of classname in ()=> this way
Topics
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published