astroturf
astroturf copied to clipboard
React Native support
One of the biggest reason to use styled-components is RN support.
It definitely, should be some CSS→RN loader for webpack. We need only show some example in the docs.
what would this look like for RN, they don't have stylesheets right? we'd need to turn the extracted style into something they can use...i'm super unfamiliar with RN :P
Me too :(.
Seems like they need inline styled or something similar.
I don’t suggest to have first-class support for RN. Just any snippet in docs for marketing purposes.
looks like SC already solved this, so we just need to add a RN entry that uses https://github.com/styled-components/css-to-react-native
I wonder if that would be a good idea tho, it would be all at runtime, which is fine for RN but a little "off brand" so to speak for us
right, i don't really see the point...
I mean it is some amount of work, we can convert to an object before hand reducing the runtime cost of something like this, so it would be an improvement runtime-wise over SC. The main benefit tho i'd see is potential sharing? Or rather not having to switch abstractions/packages if you want to use a SC style api in both. However, most of our value as an abstraction is derived from the underlying preprocessor which you'd lose maybe here.
I have no idea what the RN build step is as well...is it even possible to preprocess the file?