Synthetic Events are a cross-browser wrapper over native browser events created by React.
Simple analogy: Imagine you are writing a letter to a friend in another country.
Why this is needed: Different browsers implement events differently:
e.keyCode, in another e.which.e.key, e.target.value and everything works the same.How it works (before React 17): React added ONE handler to the root document (not to each element!). This is called "event delegation". Memory saving.
With React 17+: events are delegated to the root node (where React is rendered), not to document. This improves compatibility with nested React applications and other libraries.
Important: Synthetic Events are reused (event object is reused). Do not store a reference to the event asynchronously — use e.persist() or save the needed fields.
Performance consideration: Event delegation means React attaches very few native event listeners. This is more memory-efficient than attaching individual handlers to each element, especially in large component trees.