We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I am currently using @legendapp/state version 3.0.0-beta.19, and facing a strange issue with arrays and undo.
@legendapp/state
3.0.0-beta.19
Details -
todos$.items.push(todo)
undo
null
todos$.items.set(pre => [...pre, todo])
This happens when there is only one element in the array and undo is called.
Reproduction Link - https://codesandbox.io/p/sandbox/w7yn9l
Am I missing something here, or is there some conditions before using undo?
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I am currently using
@legendapp/state
version3.0.0-beta.19
, and facing a strange issue with arrays and undo.Details -
todos$.items.push(todo)
. It gets added as expected and react renders the new item.undo
null
instead of making the array as empty.todos$.items.set(pre => [...pre, todo])
instead of a pushThis happens when there is only one element in the array and
undo
is called.Reproduction Link - https://codesandbox.io/p/sandbox/w7yn9l
Am I missing something here, or is there some conditions before using
undo
?The text was updated successfully, but these errors were encountered: