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
Something which is pretty obvious for someone a little experience, but still might be worth a note in the docs:
state.array = [{ a: 1, b: 1 }] dispatch('module/patch', { array: arrayRemove({ a: 1, b: 1 })})
Will remove the object at Firestore, but not locally, hence creating a sync issue. This is how to do it:
state.array = [{ a: 1, b: 1 }] dispatch('module/patch', { array: arrayRemove(state.array[0]) })
Same goes for arrayUnion, it is up to the user to check if the array doesn't already contain the value before triggering the action:
arrayUnion
state.array = [.......] const el = state.array.find(v => (v.a === 1 && v.b === 1)) || { a: 1, b: 1 } dispatch('module/patch', { array: arrayRemove(el) })
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Something which is pretty obvious for someone a little experience, but still might be worth a note in the docs:
Will remove the object at Firestore, but not locally, hence creating a sync issue.
This is how to do it:
Same goes for
arrayUnion
, it is up to the user to check if the array doesn't already contain the value before triggering the action:The text was updated successfully, but these errors were encountered: