Dev Jobs Platform

Solution retrospective
- What did you find difficult while building the project?
The biggest challenge for this project was persisting the theme mode using localStorage. In normal react application, i can just call the localstorage because react is used for server side application. However, to be able to use the client side methods in Next.js requires its own approach such as using 'use client' directive. I experienced that using 'use client' directive on top of the file did not resolve the issue with 'window/localstorage is not defined'. that's why i had to use useEffect to confirm that localstorage is defined fully from client side.
-
Which areas of your code are you unsure of? use local storage hook. It required different approach compared to pure React
-
Do you have any questions about best practices? I would like to know the best practice of Next.js 13
Please log in to post a comment
Log in with GitHubCommunity feedback
No feedback yet. Be the first to give feedback on Jongok's solution.
Join 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