title: Should I memoize the returned object of a custom React hook?
body: <p>If I used <code>useCallback</code> for the methods of my custom hook, should I also memoize the returned object? I would assume that it would not create a new object everytime since it's composed with memoized methods and primitives.</p>
  
  <pre><code>export const useToggle = (args: UseToggleProps) =&gt; {
      const initialState=
          args.initialState !== undefined ? args.initialState : false
      const [active, setActive] = useState(initialState)
  
      const toggleOff = useCallback(() =&gt; {
          setActive(false)
      }, [])
  
      const toggleOn = useCallback(() =&gt; {
          setActive(true)
      }, [])
  
      const toggle = useCallback(() =&gt; {
          setActive((active) =&gt; !active)
      }, [])
  
      // Should this also be memoized with useMemo?
      return {
          active,
          toggle,
          toggleOff,
          toggleOn
      }
  }
  </code></pre>