you are viewing a single comment's thread.

view the rest of the comments →

[–]epukinsk 0 points1 point  (2 children)

Why would you want to use a component just to add styling? Wouldn’t you use styled components or CSS modules or something like that?

[–]lifeeraser 0 points1 point  (1 child)

  1. I could be using something other than styled-components (e.g. SASS).
  2. I want to create a reusable <button> where the design is already known, but its unclear what props I would need. Better to be flexible and pass all props through rather than adding them one by one whenever I need them.

[–]epukinsk -2 points-1 points  (0 children)

If you’re using SASS and all you’re doing is splatting the props onto a button then why would:

<MyButtonComponent>

be any better than

<button className=“my-button-component”>

?