September 2022
Intermediate to advanced
410 pages
10h 7m
English
Where Stimulus encourages using the markup you are already writing, therefore keeping CSS in its own separate files, React encourages thinking about CSS and code together. Once you get in the habit of thinking of your page as made up of a number of different React components, it’s only a small step to imagine those components as containing their own CSS for features that are specific to that component.
Including CSS with React code is such a common thought that there are oodles of libraries that handle this. I’m going to talk about one of these libraries that has an interesting way to insert CSS into your React code: styled-components.
The styled-components library allows ...