score:3

Any native event handlers will fire before React event handlers.

This is how React works with events:

  1. It listens to events at the top-level and converts them to Synthetic Events
  2. Puts them in a pool to maintain order
  3. Dispatches to React components

Because of this, order is maintained within the React ecosystem but out of order relative to the rest.

As explained in this video: https://www.youtube.com/watch?v=dRo_egw7tBc

And vaguely described in the docs: https://facebook.github.io/react/docs/events.html#event-pooling


Related Query

More Query from same tag