DEV Community

Discussion on: Converting a React component to TypeScript

Collapse
 
jbartusiak profile image
Jakub Bartusiak • Edited

Good walkthrough. The point of using react events is to guarantee that they get handled the same way, no matter which browser the app is running it - but agreed that for the demo here that's not really crucial. While you're typing your event to a change event, under the hood you're still using the synthetic event. The interface is the same, that's why you don't see any errors.

Collapse
 
mbarzeev profile image
Matti Bar-Zeev

Thanks for the informative feedback! I am still not quite sure, bit something tells me that if we can avoid additional abstractions, we should. So in general, if the "plain" interface is applicable, I don't a reason to use the abstraction.