refactoring inline styles to styled components

i often reach for emotion in react native projects because it has a nice api to support themes, and it makes it easy to move stuff around compared to stylesheet.create.

that said, it’s tedious to refactor stuff into these styled component type of things so i find myself adding style props here and there. this is where styco comes in: you write inline styles, run the thing, and it refactors it into a styled component.

Daniel Huth generously added support for object syntax via a configuration option, and accepted a small patch, making this a really helpful tool for me.

© 2024 peter schilling