Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(utils): fix proxyWithHistory behavibor with nested objects #531

Merged
merged 6 commits into from
Sep 5, 2022
Merged

fix(utils): fix proxyWithHistory behavibor with nested objects #531

merged 6 commits into from
Sep 5, 2022

Conversation

LukasSchwarz4202
Copy link
Contributor

@LukasSchwarz4202 LukasSchwarz4202 commented Aug 27, 2022

Related Issues

Test to reproduce issue #516.

And, a fix.

@vercel
Copy link

vercel bot commented Aug 27, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
valtio ✅ Ready (Inspect) Visit Preview Aug 29, 2022 at 8:19AM (UTC)

@codesandbox-ci
Copy link

codesandbox-ci bot commented Aug 27, 2022

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 39f2b55:

Sandbox Source
React Configuration
React Typescript Configuration
React Browserify Configuration
React Snowpack Configuration
React Parcel Configuration

@dai-shi
Copy link
Member

dai-shi commented Aug 29, 2022

Let's wait for #528, which might provide a better option.

@dai-shi dai-shi changed the title history.test: added test to recreate bug #516 fix(utils): fix proxyWithHistory behavibor with nested objects Aug 29, 2022
@dai-shi
Copy link
Member

dai-shi commented Aug 29, 2022

Let's wait for #528, which might provide a better option.

On second thought, deepClone can be more efficient, because it only happens for undo/redo. (The other method I had in mind is to do copy on saveHistory.)

@dai-shi dai-shi linked an issue Aug 30, 2022 that may be closed by this pull request
@dai-shi dai-shi merged commit 54c30c3 into pmndrs:main Sep 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unexpected behavior using proxyWithHistory
2 participants