DEV Community

Jona
Jona

Posted on

1

Should layout markup be a component in React?

Do layout markup need to be a component of its own?

For example

Do we need a Card component that adds a border and padding to a card like soo


....

Instead of using a pure html + css solution like

...

I really like the second approach and I feel like lesser components are a better solution from a performance perspective.

On the other hand the second solution follows atomic design.

Top comments (0)

Sentry image

See why 4M developers consider Sentry, “not bad.”

Fixing code doesn’t have to be the worst part of your day. Learn how Sentry can help.

Learn more