Skip to content

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