useChannel
function useChannel<M, R>(name): Channel<M, R>;Get the page-wide typed channel for name (one instance per name).
Type Parameters
Section titled “Type Parameters”| Type Parameter | Default type |
|---|---|
M extends MessageMap | - |
R extends Partial<Record<keyof M, unknown>> | Record<never, never> |
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
name | string |
Returns
Section titled “Returns”Channel<M, R>