Skip to content
Discussion options

You must be logged in to vote

UnistylesRuntime works like a regular JavaScript object. You can access its values, but your component will never re-render because nothing will notify it of changes.

const { theme } = useUnistyles() provides an escape hatch for components that can’t be wrapped in withUnistyles. It behaves the same way as in Unistyles 2.0.

withUnistyles is the preferred option, because it can track your style dependencies and re-render only when necessary

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by ilovepku
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