Archive

#events

3 notes match these filters

  • How React Works · Part 107 min read

    Events: One Listener at the Root

    React never attaches your onClick to the button; one listener per event type on the root container finds the target's fiber, walks the component tree to collect your handlers, and gives their updates a priority.

  • React Internals · Part 139 min read

    The Event System

    React doesn't attach your onClick to the button. When you call createRoot(container), it puts one capture and one bubble listener per native event type on the root container. On a…