SyntheticEvent in React is a cross-browser wrapper similar to browers’s native events;
It has the same interface as the browser’s native event,
including stopPropagation() and preventDefault(),
except the events work identically across all browsers.
Until React 18,
React’s synthetic media events contain several existing media events,
for instance onLoadedMetadata and onVolumeChange.
But there is no onResize handler.
<video> element with a onResize prop would display a warning
Warning: Unknown event handler property `onResize`. It will be ignored.
With the changes
in React 18,
onResize props are added to <video> element that triggers when one or both of the videoWidth and videoHeight attributes have just been updated.
It’s useful for responding to resolution changes in video players.