0๐
If you are fetching records from an API I recommend that you update by fetching from the API, and if you want to update the item within your state, try this:
updateRecord(state, updatedRecord) {
const { title, value } = updatedRecord;
let recordIdx = state.records.find((rec) => rec._id === updatedRecord._id);
recordIdx.title = title
recordIdx.value = value
...
},
- [Vuejs]-Removing firestore from Vue project but retaining firebase auth
- [Vuejs]-How to create forms using VUE?
Source:stackexchange.com