Skip to content

Suggestion: Use 'next-themes' for theme switching #430

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

pavel-fokin
Copy link
Contributor

Rely on the standard solution rather than a custom script. Not sure if I missed some extra logic in custom script.

‼️ I don't know how to test Reciept page.

  • Maintaince. For example, prefer addEventListener over the deprecated addListener.
  • Follows best practices.
  • Easier integrate with theme on the components level

@ihomp
Copy link
Member

ihomp commented Jul 8, 2025

The whole purpose of the script in [_document.js] that the right theme will be used right away before rendering.. so we don't have a "flash" of white or black background etc when refreshing the page, or when there is no cookie yet.

it's also good not to wait for mounted=true in many cases.

I wouldn't touch it what we have.. just to make sure we don't break all the edge cases we used to test relates to themes.

What is the reason for a change?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants