@fazzaamiarso
Posted
Hi @JaredBrown1! Great work on finishing your project!
I think I can help answer your questions:
- State management is definitely hard. My recommendation is to read this article by Kent C. Dodds as a starting point. I also encourage you to read his other articles on React because I learnt a lot of best practices from him.
- In
next-themes
, You can get the user's system theme returned byuseTheme
. Here's the documentation reference. Example:
const { systemTheme } = useTheme()
useEffect(() => {
// set toggle state based on user's theme
}, [])
- To keep your codebase clean and formatted nicely, you always want to have ESLint combined with Prettier. Here is a simple tutorial
I hope it helps! Cheers!
Marked as helpful