Adds an event handler to an event so the event handler runs when the event is emitted. Use papi.network.getNetworkEvent to use a networked event with this hook.
papi.network.getNetworkEvent
The event to subscribe to.
PlatformEvent
The callback to run when the event is emitted
WARNING: MUST BE STABLE - const or wrapped in useCallback. The reference must not be updated every render
Adds an event handler to an event so the event handler runs when the event is emitted. Use
papi.network.getNetworkEvent
to use a networked event with this hook.