Provide an EventBus instance to the React component tree via context.
Clears all listeners on unmount to prevent leaks in HMR / test scenarios.
The caller owns the bus lifecycle — create it outside the component tree
or with useRef, then pass it as the bus prop.
Provide an EventBus instance to the React component tree via context.
Clears all listeners on unmount to prevent leaks in HMR / test scenarios. The caller owns the bus lifecycle — create it outside the component tree or with
useRef, then pass it as thebusprop.