Visual primitives for the component age. Use the best bits of ES6 and CSS to style your apps without stress 💅
40.11k
stars
2.48k
forks
source link
styled-components injects styles for non loaded components on react-native-web #4271
Open
macrozone opened 2 months ago
Environment
System:
Binaries:
Reproduction
I noticed this problem when tracing StyleSheet.create on react-native-web in the other issue https://github.com/styled-components/styled-components/issues/4270
Steps to reproduce
you can actually use the same repo as in https://github.com/styled-components/styled-components/issues/4270
https://github.com/macrozone/styled-components-rnw-reproduction
function create(styles) {
addconsole.log("create stylesheet", styles)
Expected Behavior
styled-components/native should only create Stylesheets for components actually created
Actual Behavior
styled-components/native creates stylesheet for unused components as well