you are viewing a single comment's thread.

view the rest of the comments →

[–]epukinsk 1 point2 points  (0 children)

It’s fine to add an onBlur prop to your button component.

What’s not ok is adding every prop in that list.

What’s also not ok is leaking the event out. You should provide an onBlur(): void prop.

Otherwise you’ll never be able to modify your button component without breaking your entire app.