Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[feature request] CodeMod to covert React Native StyleSheet to styled-components #9

Open
louiechristie opened this issue May 5, 2019 · 0 comments

Comments

@louiechristie
Copy link

[feature request] Please can we have a codemod that will automatically convert a React Native project from using StyleSheet.create to styled-components? A sort of opposite to https://github.com/styled-components/css-to-react-native ?

Use case:

John the developer has a React Native app. He used the built in React Native StyleSheet.create method for CSS styling. John also makes websites. John keeps on accidentally using the wrong syntax in React Native because it is similar but slightly different to web css syntax. (A UX mode error.) John wastes a lot of expensive developer time fixing these syntax errors. Particularly terminating a line of css with a semicolon ; when it should be a comma , or vice versa. John then shouts at his partner. John kicks the dog.

John then runs a codemod to convert his React Native code to use styled-components. John now uses the same css syntax when writing apps and websites. John makes less syntax errors. John always terminates a line of css with a semi-colon. John is happy. In the time freed up by not having to fix syntax mode errors John investigates writing universal apps using react-native-web or similar. John is productive. John proposes to his partner. John gives his dog a bone. They all live happily ever after.

@louiechristie louiechristie changed the title CodeNode React Native StyleSheet to styles-component [feature request] CodeMod for React Native StyleSheet to styles-component May 5, 2019
@louiechristie louiechristie changed the title [feature request] CodeMod for React Native StyleSheet to styles-component [feature request] CodeMod to covert React Native StyleSheet to styled-component May 5, 2019
@louiechristie louiechristie changed the title [feature request] CodeMod to covert React Native StyleSheet to styled-component [feature request] CodeMod to covert React Native StyleSheet to styled-components May 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant