Closed rohaldb closed 8 months ago
Hey @rohaldb! My sincere apologies for the delay. I am looking into this.
Can you perhaps provide some code that reproduces this error? Typically, this error arises from data that references itself/part of itself ("circular"), but it can also be the symptom of another issue. I will say, without knowing what your data looks like, it's best to keep pretty simple objects in useUndoable (just like useState
). If your data is really complex, you can use a transformer to convert the data into something simpler for the purposes of local mutation.
Looking forward to your response!
Closing due to inactivity
I'm unable to set the state of a deeply nested object. I get this error:
I am using it like this:
Initial value is undefined due to handling async, similar to your use case for resetInitialState.
In my case the FixtureGroupEntity is a deeply nested object.
Any ideas?