Hi there! Are you looking for the official Deno documentation? Try docs.deno.com for all your Deno learning needs.

useContext

Returns the current context value, as given by the nearest context provider for the given context. When the provider updates, this Hook will trigger a rerender with the latest context value.

function useContext<T>(context: PreactContext<T>): T;
§
useContext<T>(context: PreactContext<T>): T
[src]

§Type Parameters

§Parameters

§
context: PreactContext<T>
[src]

The context you want to use

§Return Type