- Routes in react js. (react-router-dom)
- Avoid page reloading here if you clicked on other options (Home, About, Contact)
- Use <Link> Component instead of `a` tag
- To change the active tabs use <NavLink> instead of <Link> and use `exact ` attribue.
- <NavLink className="nav-link" exact to="/">Home</NavLink>
- 404 Page
- <Route component={Notfound} />
- Fake Json Server.
- npm i json-server
- Create db.json file with dummy data from JSON placeholder.
- Run Server & React with single npm install
- Run 2 scripts at once. ( concurrently )
- Async functions
- In React if you want to use variables from .env you must use the `REACT_APP_` prefix Like this `REACT_APP_DB_SERVER_URL`.
- And you must restart the server.
- useHistoy Hook.
- Edit particular user in react.
- http://localhost:3000/users/edit/1
- You can use `useParams` Hooks to get values from the URL.
0 comments:
Post a Comment