Function: useDependencyContext()
function useDependencyContext<T>(depValue$, defaultValue?): {
Provider: (props) => JSX.Element;
value: T | undefined;
}
Defined in: packages/api/tmp/univer-pro/node_modules/.pnpm/@wendellhu+redi@0.17.0/node_modules/@wendellhu/redi/esm/react-bindings/reactRx.d.ts:32
subscribe to an observable value from a service, creating a context for it so it child component won’t have to subscribe again and cause unnecessary
Type Parameters
Type Parameter |
---|
T |
Parameters
Parameter | Type |
---|---|
depValue$ | Observable <T > |
defaultValue ? | T |
Returns
{
Provider: (props) => JSX.Element;
value: T | undefined;
}