Tag:  styled-components

Theming with styled-components

Theme can be stored (or generated) in a js file. For instance, we can keep all of them, in ./themes folder and load, while bootstrapping the application.

Styled-components "Warning Received `true` for non-boolean attribute"

IMO styled-components library has only one problematic warning. It's "Warning: Received true for non-boolean attribute". When I encountered it for the first time it took me some time to figure out what was the problem.

Styled-components - the interesting parts

The whole logic of styled-components can be described in one "feature request": "Let's manage CSS in js alongside with component core code". The logic behind it is sort of obvious - it will give us the dynamic of js inside of CSS and we'll be able to treat styling as part of component code and not store it in a separate file.

The idea is promising, now let's see what are some of the edge cases. And why is that? Because nothing is ideal in the world.