Gatsby works perfect with the styled components library styled-components.com/
Answering your question above: if you want to create a div with specified styles, you can create a Div component
const Div = styled.div' background: blue; '
Where instead of ' ' you use` ` but I can't apply this in the comment:/
` `
And then you pass <Div>...</Div> instead of simple <div>...</div>
<Div>...</Div>
<div>...</div>
The other way is to use CSS modules gatsbyjs.org/docs/css-modules/
And you can also just style by className. Yes, that' so simple
I hope I could help 💥
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Gatsby works perfect with the styled components library styled-components.com/
Answering your question above: if you want to create a div with specified styles, you can create a Div component
Where instead of ' ' you use
` `
but I can't apply this in the comment:/And then you pass
<Div>...</Div>
instead of simple<div>...</div>
The other way is to use CSS modules gatsbyjs.org/docs/css-modules/
And you can also just style by className. Yes, that' so simple
I hope I could help 💥