Quickupdate

  • Home
  • Top Trending
    • Top Android Apps
    • Top Ios Apps
  • Featured
  • About Us
  • Contact us
  • Privacy Policy and Disclaimer

Sunday, 4 July 2021

React CRUD App.

 Developers     July 04, 2021     React     No comments   

  1. Routes in react js. (react-router-dom)

  2. Avoid page reloading here if you clicked on other options (Home, About, Contact)
    1. Use <Link> Component instead of  `a` tag
    2. To change the active tabs use <NavLink> instead of <Link> and use `exact ` attribue.
      1. <NavLink className="nav-link" exact to="/">Home</NavLink>

  3. 404 Page
    1. <Route component={Notfound} />

  4. Fake Json Server. 
    1. npm i json-server
    2. Create db.json file with dummy data from JSON placeholder.

  5. Run Server & React with single npm install
    1. Run 2 scripts at once. ( concurrently )

  6. Async functions

  7. In React if you want to use variables from .env you must use the `REACT_APP_` prefix Like this `REACT_APP_DB_SERVER_URL`.
    1. And you must restart the server.

  8. useHistoy Hook.

  9. Edit particular user in react.
    1. http://localhost:3000/users/edit/1
    2. You can use `useParams` Hooks to get values from the URL.

  • Share This:  
  •  Facebook
  •  Twitter
  •  Google+
  •  Stumble
  •  Digg
Email ThisBlogThis!Share to XShare to Facebook
Newer Post Older Post Home

0 comments:

Post a Comment

Popular Posts

  • How to upload the existing folder on GitHub Or GitLab?
    These are the steps to upload the existing folder on GitHub Or GitLab. Whenever you want to push your existing folder to git or GitHub you m...

Categories

  • FAANG (2)
  • Javascript (6)
  • Node (1)
  • Project Management (1)
  • React (9)
  • SQL (1)
  • Testing (1)

Blog Archive

  • January 2023 (1)
  • January 2022 (1)
  • November 2021 (3)
  • October 2021 (3)
  • August 2021 (1)
  • July 2021 (7)
  • June 2021 (12)
  • February 2021 (1)
  • January 2021 (1)
  • January 2020 (3)
  • August 2019 (3)