Web styles
We’ve made Unistyles web completely undependent from React Native Web by creating our custom web parser which generates CSS from your StyleSheet’s.
How it works
The web parser generates classNames based on your config and assigns them to the given DOM element. This results in zero redundant styles!
In addition we’re generating media queries based on provided breakpoints
instead of recalculating them on every app’s resize.
Updating styles
When your changing your app’s theme Unistyles will simply update your CSS without any re-render, the same goes for dynamic functions & variants.
Now let’s update theme to a light one:
And voila, the CSS is now updated:
Limitations
Because we’re using the custom parser we can’t return your styles directly since React Native Web will parse them in that case.
Keep that in mind when using StyleSheet.create
in your web app.
Web Only Features
Unistyles also provides you with some web only features, read more about them here.