react-native-sass-transformer icon indicating copy to clipboard operation
react-native-sass-transformer copied to clipboard

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

Open martin-braun opened this issue 3 years ago • 1 comments

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.

martin-braun avatar Jan 20 '21 22:01 martin-braun

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

kristerkari avatar Jul 14 '21 13:07 kristerkari