Design comparison
SolutionDesign
Solution retrospective
What are you most proud of, and what would you do differently next time?
It was an interesting experience of building project with React and mocking db with localStorage. Next time I will create a db service or use lowdb to mock data and learn to create custom hooks in React to fetch data.
What challenges did you encounter, and how did you overcome them?There was a problem with a project in the production, because it didn't fetch data in useEffect and therefore there no App rendered.
- In the development environment useEffect runs twice to check possible bugs in your components, but in the production it runs only once.
- To fetch data once there was a condition and boolean ref variable, and a function which changes ref after the first hook runs.
My failure was to initially set variable to false, so in the production mode there was no data fetch.
What specific areas of your project would you like help with?- What techics do you use to save data locally for you projects?
- How often do you clear that local data?
- If you used real database for this project, how did you to minimize requests number to a real server?
Community feedback
Please log in to post a comment
Log in with GitHubJoin our Discord community
Join thousands of Frontend Mentor community members taking the challenges, sharing resources, helping each other, and chatting about all things front-end!
Join our Discord