Do React hooks cause Rerender?

However great this is, it is essential to note that purely functional components with hooks always re-render during a React render cycle . Therefore, React Hooks provide the best example for component reusability. When a parent component renders, React recursively renders all of its child components.

Read more

Can I use EventEmitter in react?

scene. EventEmitter is very suitable for component communication without modifying the component state structure . However, its life cycle is not managed by react, so it is troublesome to manually add / clean up listening events. Moreover, if an EventEmitter is not used, it will be a bit troublesome to be initialized.

Read more