import { useMemo } from "react";
      
      const memoizedValue = useMemo(() => { 
        return expensiveComputation(dependencies) 
      }, [dependencies]);
      Javascript language logo
      your recipe card header background

      Next useMemo

      next
      hook
      memo
      ...
      NextJS Javascript Recipes

      Returns a memoized value.

      Pass a β€œcreate” function and an array of dependencies. useMemo will only recompute the memoized value when one of the dependencies has changed. This optimization helps to avoid expensive calculations on every render

      Library: next

      Shortcut: next.hook.memo.use

      0 Comments

        Add Comment

        Log in to add a comment

        Codiga - All rights reserved 2022.