Function: useLeaderEffect()
function useLeaderEffect(effect, options?): void;
Run an effect only in the tab that holds the seat, and tear it down when the seat moves. The one place to put "exactly one tab owns the socket".
Parameters
| Parameter | Type |
|---|---|
effect | () => void | (() => void) |
options? | UseLeaderOptions |
Returns
void