Atomic Design and React
I am following Brad Frost's Atomic Design principles in React and am wondering if I'm creating an antipattern. I have a Heading component that just renders a heading tag and some styling. Seems simple enough, but there are multiple different use cases for this simple Heading component, so I'm conditionally rendering jsx and styling based of a
type
property. This, however, can really bloat up my component and I'm wondering if I'm doing too much in one component. This is a simpler example but I have many other components like this in my project.
Below is an example:
0 Replies