react-native-css-modules icon indicating copy to clipboard operation
react-native-css-modules copied to clipboard

[discussion] Include CSS Media Queries and CSS Viewport Units to the default setup

Open kristerkari opened this issue 6 years ago • 0 comments

Currently CSS media queries and CSS viewport units are not included in the default setup docs.

The main reason is that the default setup of React Native CSS modules does all the transformation during the build of the app, so it means that is no added runtime dependency for your React Native app.

CSS media queries and CSS viewport units need to be calculated at runtime, which means that there is a small piece of javascript that runs each time the app is rendered.

I have not noticed any difference in performance when replacing the default setup with the responsive support (CSS media queries and CSS viewport units). This is why the setup and docs would be much simpler if the responsive features would always be included by default.

The only worry that I have is that there should be some way of verifying that there are no runtime performance regressions if a runtime library is always used. This could be achieved by somehow measuring the runtime performance with the runtime library and without it.

kristerkari avatar Jan 20 '19 16:01 kristerkari