Closed mkelley82 closed 7 years ago
Hi, I had the same requirement. I simply cloned the initial store and saved it in a variable. Then I added a method on the store itself to "restore" the initial state based on the saved state.
That's what i ended up with as well. Thanks for sharing.
ozeebee has the recommended solution! Thanks guys! glad you figured it out :)
How would you go about resetting the store to the initial state (intial state declared in separate files and imported)... without manually resetting all the properties of the state?