Closed efoken closed 4 weeks ago
stylex.include
is not a StyleX API we expect to keep. We don't use it internally
Good to know, thanks 🙏 But how is it possible to use object spreading?
But how is it possible to use object spreading?
This happens due to how StyleX is implemented as a runtime lib for RN. This will likely change in the future and is not safe to depend on.
Yeah I know @nmn 😉 I meant, what is the recommended way to handle this case when I want to include typography style into another style? What can I use instead of css.include
?
You just add the style into the array of styles passed as a prop - it's the default way that styles are composed in RN and StyleX
Describe the feature request
I don't know if
stylex.include
is an official StyleX API? But with react-strict-dom thecss.include
works on Web, but not for Native.Example:
For Native I tried to use normal object spread, and it worked: