You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've been experiencing an issue when using onChange with isShallow: false. In my code I end up doing something like this obj1 === obj2 which will return false, however when I look closely they are the same object under the hood, it's just that one of them is wrapped in an additional proxy. I was able to reproduce this issue in a codesandbox here. You'll need to open your browser console, as the built in console does not show the proxies.
From what I've gathered, when getProxy() in cache.js gets called, the target is already a proxy and will end up getting wrapped in another proxy. There may be other ways to end up in this scenario other than what I've provided, but, I think a solid solution would prevent this from ever happening again.
I've been experiencing an issue when using onChange with isShallow: false. In my code I end up doing something like this obj1 === obj2 which will return false, however when I look closely they are the same object under the hood, it's just that one of them is wrapped in an additional proxy. I was able to reproduce this issue in a codesandbox here. You'll need to open your browser console, as the built in console does not show the proxies.
From what I've gathered, when getProxy() in cache.js gets called, the target is already a proxy and will end up getting wrapped in another proxy. There may be other ways to end up in this scenario other than what I've provided, but, I think a solid solution would prevent this from ever happening again.
Edit: here is more simple example of this problem happening
The text was updated successfully, but these errors were encountered: