kristerkari / react-native-sass-transformer

Use Sass to style your React Native apps.
MIT License
219 stars 19 forks source link

Convert kebab-case (dash-case) classnames to camelCase #43

Open martin-braun opened 3 years ago

martin-braun commented 3 years ago

Please give an option to convert classnames with dashes to camcelCase in the code. I.e. .my-class selector should be usable with styles.myClass instead of styles['my-class'].

It feels more natural to me, as I can use conservative class names in SCSS while avoiding the bracket madness in React.

kristerkari commented 3 years ago

There is a plugin that uses the styleName property that allows you to use whichever selector style that you want: https://github.com/kristerkari/babel-plugin-react-native-stylename-to-style#multiple-classes