Currently, the old listeners are not properly cleaned up. When the UI re-renders, the old listeners are still attached and cause duplicate UI updates.
These events can probably be refactored to take advantage of the hook system and useEffect cleanup behavior. Likely also depends on the core refactoring task, since hooks are part of the core functionality and will only work with function components at the moment.