-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tree shaking #14
Comments
@nandorojo thanks for bringing this up 🙂 I think staying consistent with the Stitches API is quite important so I'm hesitant to make this kind of a change. I'm wondering how other React Native styling libraries handle tree shaking 🤔 It seems that |
Yeah, styled components for native also breaks tree shaking. |
Dripsy has tree shaking enabled. The only way to do so is to build with |
I feel like this is not a priority for this project right now especially if tree shaking cannot be achieved with the string based API. I wouldn't want to diverge from the API that the main Stitches lib uses. I'm gonna close this issue for now but I'm definitely open to continuing the discussion with potential solution ideas 🙂 |
Makes sense. In my opinion, this is one of the differences with RN and React DOM — you interact directly with components instead of with markdown-based elements. The ideal situation would be for tree shaking to work, even with strings 🤷♂️ oh well, thanks again! |
One other idea: you could have a separate import (like |
See my comment at stitchesjs/stitches#596
The styled function shouldn’t accept strings.
The text was updated successfully, but these errors were encountered: