Skip to content

useDisposableMemo

Latest
Compare
Choose a tag to compare
@lxsmnsyc lxsmnsyc released this 26 Oct 10:57
· 40 commits to main since this release

Adds the useDisposableMemo which allows automatic disposal of memoized third-pary objects.

Objects created in this process gets disposed when:

  • Dependencies changes.
  • The component gets cancelled (e.g. Strict Mode rendering)
  • The component unmounts.