Skip to main content
The Deno 2 Release Candidate is here
Learn more
Module

x/netzo/deps/preact/hooks.ts>useMemo

Full-stack Deno framework for building business web apps like internal tools, dashboards, admin panels and automated workflows.
Go to Latest
function useMemo
import { useMemo } from "https://deno.land/x/netzo@0.4.40/deps/preact/hooks.ts";

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.

Parameters

factory: () => T
inputs: Inputs | undefined