Closed trm217 closed 2 months ago
The latest updates on your projects. Learn more about Vercel for Git ↗︎
Name | Status | Preview | Comments | Updated (UTC) |
---|---|---|---|---|
next-themes-basic | ✅ Ready (Inspect) | Visit Preview | 💬 Add feedback | Apr 24, 2024 4:04pm |
next-themes-tailwind | ❌ Failed (Inspect) | Apr 24, 2024 4:04pm | ||
next-themes-with-app-dir | ❌ Failed (Inspect) | Apr 24, 2024 4:04pm |
Description
Fixes #277. The dependencies of the set-state function, that is a useCallback hook it's self were faulty. This PR defined 'theme' as a dependency of the callback-hook and removes 'forcedTheme' from the dependency. Additionally a test-case has been added where setState is called with
(theme) => theme === 'light' ? 'dark' : 'light')
This PR is based on: #285
Commits