Please, remove synthetic events, and start with platform ones.
Synthetic events were a mistake from the start, but now – they're a developer headache. In addition to other known problems of React synthetic events – they violate platform (browsers) API, which is unacceptable at all, ant that – violation of platform API – is the primary reason to remove them totally.
React version: all
Why synthetic events were a mistake from the start?
Because when React appeared, most of cross-browser issues were already solved, and W3C DOM Level 3 Event specifications were standardized. A simple wrapper would be much better and safer, like:
function eventDecorator(event) {
if (!Object.hasOwnProperty(event, 'target')) {
Object.defineProperty(event, 'target', {
get() {
return this.srcElement;
}
})
}
// ...etc
}
but instead, we have proprietary synthetic events. Nothing more that a vendor-lock, expect bugs and headache.
Please, remove synthetic events, and start with platform ones.
Synthetic events were a mistake from the start, but now – they're a developer headache. In addition to other known problems of React synthetic events – they violate platform (browsers) API, which is unacceptable at all, ant that – violation of platform API – is the primary reason to remove them totally.
React version: all
Why synthetic events were a mistake from the start?
Because when React appeared, most of cross-browser issues were already solved, and W3C DOM Level 3 Event specifications were standardized. A simple wrapper would be much better and safer, like:
but instead, we have proprietary synthetic events. Nothing more that a vendor-lock, expect bugs and headache.