dai-shi / proxy-memoize

Intuitive magical memoization library with Proxy and WeakMap
http://proxy-memoize.js.org/
MIT License
719 stars 16 forks source link

fix: nested memoized function usage #64

Closed dai-shi closed 1 year ago

dai-shi commented 1 year ago

fix #63

fixing wrong change in #60. Oh, it's very very tricky.

codesandbox-ci[bot] commented 1 year ago

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit cfbb72279cc4fcb7e736ad451146964edc956f1a:

Sandbox Source
Vanilla Configuration
Vanilla Typescript Configuration
React Configuration
React Typescript Configuration
dai-shi commented 1 year ago

So, the strange behavior was due to proxyCache. It doesn't work well for nested proxies. 🤔