Search posts, tags, users, and pages
People expect dark mode your application. Keep on top of the game with Tailwind and its easy dark mode integration.
Juan Alvarez
@Juanzen · Miranda, VE
Frontend web developer
Front-end developer | React (Next.js)
Markdown supported · ⌘↵ to post
JOY SAM RAJ
I guess change this line
const [theme, setTheme] = useState(localStorage.getItem('theme'));
Because while refreshes it overrides the local storage
Shantun Parmar
very amazing article
Thank you, Shantun. I'm glad you enjoyed it 🙂
JOY SAM RAJ
I guess change this line
const [theme, setTheme] = useState(localStorage.getItem('theme'));Because while refreshes it overrides the local storage