You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
getState's documentation says that it makes a deep copy, but restoreState does not make a copy when you pass this back in.
So, if you store a state, restore a board to that state, and modify the board, your stored state is mutated. This makes it very difficult to maintain a history, or keep a permanently-stored state that you revert to more than once.
getState
's documentation says that it makes a deep copy, butrestoreState
does not make a copy when you pass this back in.So, if you store a state, restore a board to that state, and modify the board, your stored state is mutated. This makes it very difficult to maintain a history, or keep a permanently-stored state that you revert to more than once.
See this JS fiddle for an example: https://jsfiddle.net/czjxue6y/4/
The text was updated successfully, but these errors were encountered: