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

[Feature] Deep/nested mutations #54

Open
SaphuA opened this issue Nov 19, 2019 · 1 comment · May be fixed by #92
Open

[Feature] Deep/nested mutations #54

SaphuA opened this issue Nov 19, 2019 · 1 comment · May be fixed by #92

Comments

@SaphuA
Copy link

SaphuA commented Nov 19, 2019

Do you think it would be possible to add support for deep mutations to support state with nested fields? I'm sure it won't be an easy task, but it would sure be awesome! Nested fields are supported in that they are reactive, but obvously there's no mutation associated with them.

@SaphuA SaphuA changed the title [Feature] Deep mutations [Feature] Deep/nested mutations Nov 19, 2019
@Glandos
Copy link

Glandos commented Jun 25, 2020

I think this is not so difficult based on the existing code.
Automatic mutation is declared in the proxy, and this is already recursive, for each submodule for now. But I manually tried to called the internal mutator with a composed path (stateVar.prop) and it worked like a charm.

I guess the createGettersAndMutationProxyFromState can be called recursively on each enumerable property?

@Glandos Glandos linked a pull request Mar 18, 2021 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants