Skip to content
Discussion options

You must be logged in to vote

This is fine, however you need to realize that any change in the value will trigger a reload of the browser when the user makes a document request. It's unobservable, but not entirely optimal, especially in a scenario like this where the chances the value is exactly the same every time are pretty low. So every user would likely refresh each time they come to the app.

I can't tell you whether or not this is always good or always bad. Really depends on what trade-offs you're happy with. It's probably fine for many cases, but I would recommend using CSS for most problems like this instead of using a client hint for something that changes so frequently.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by yannickpschroeder
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #13 on August 28, 2024 04:45.