Open SaphuA opened 5 years ago
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?
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.