Search
    Preparing search index...
    • useMemo will only recompute the memoized value when one of the deps has changed.

      Usage note: if calling useMemo with a referentially stable function, also give it as the input in the second argument.

      function expensive () { ... }

      function Component () {
      const expensiveResult = useMemo(expensive, [expensive])
      return ...
      }

      Type Parameters

      • T

      Parameters

      Returns T