Skip to content
Discussion options

You must be logged in to vote

No. This is not the right approach. Instead of accepting arbitrary className strings, accept stylex styles instead. This pattern has been documented.

Mixing StyleX and non-StyleX styles on the same HTML element will result in unpredictable styling and should be avoided. Instead merging styleX styles is a core feature and will always merge consistently.

If you're trying to create a component library using StyleX and expect the users of that library to customise the styles of the components, the users of the components should be using StyleX as well.

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@sumanbh
Comment options

@nmn
Comment options

nmn Feb 12, 2024
Collaborator

Answer selected by nmn
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