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

useMemo

Pass a factory function and an array of inputs. useMemo will only recompute the memoized value when one of the inputs has changed. This optimization helps to avoid expensive calculations on every render. If no array is provided, a new value will be computed whenever a new function instance is passed as the first argument.

function useMemo<T>(factory: () => T, inputs: Inputs | undefined): T;
§
useMemo<T>(factory: () => T, inputs: Inputs | undefined): T
[src]

§Type Parameters

§Parameters

§
factory: () => T
[src]
§
inputs: Inputs | undefined
[src]

§Return Type