3 ms·
Beware - what this article calls a "spacer component" is nothing like <img src="spacer.gif">. Rather it is a container that specifies the spacing between its ch
by goto11 7y ago
Beware - what this article calls a "spacer component" is nothing like <img src="spacer.gif">. Rather it is a container that specifies the spacing between its child components.
The article just argues that spacing between sibling components should be specified by the container rather than by the individual components.
This makes sense in some contexts where you have a uniform spacing between components. In other contexts, like an article with headers and paragraphs, it doesn't make sense. But you probably wouldn't use React for that in the first place.
In CSS you can do both and the article is not pro or con CSS in any sense.