2👍
✅
You’re using splice incorrectly. The first argument of splice is the index to start changing the array. Instead of
state.notes.splice(state.activeNote, 1)
you should use
state.notes.splice(state.notes.indexOf(state.activeNote), 1)
👤Bert
Source:stackexchange.com