Hello!
Have you ever used style-components in a React project before? And, more generally, what are your thoughts of it?
I'm asking because we want to implement styled-components
support for Agrippa, the React CLI for component generation! In fact, it's the second issue opened on our GitHub repository!
However, I unfortunately have never personally used styled-components
in a production project, and while I did propose an implementation on the GitHub issue, it would definitely be better to hear an experienced input.
From what I've seen, different teams have used this tool in many different ways over the years.
Therefore, I'd love to hear your own experience with it, and how you're using it!
Even if you've used it in a small project or casually, speak up! the more experiences, the better - we could all learn something new as a result.
If you prefer, you're also more than welcome to join the discussion on the mentioned GitHub issue at Add support for styled components, and join the Agrippa community!
Thank you for your time!
(Cover image is from styled-components
' docs, at https://styled-components.com/meta.png)
My implementation, in a simple example, goes something like this:
Of course, the CLI generalizes this example to any component, and supports Typescript, using a named export (instead of the default export), etc.
Most examples out there used the component-specific variants, such as
styled.h1
, but to me it felt that the more genericstyled(component)
are more useful - however if you are using the component-specific variants, do tell!