Recently, during the migration to React 17, I had a problem between event listeners handled by React and one added document manually. It was due to this part on the React 17 release note.
At this moment I understood that I had a misconception of how React handles event listener. So I decided to explore the React code to understand how it works.
Before going deep in the React codebase, I would like to explain what was in my head about the management of event listeners.
For example when I write this simple code: