0š
I answered it myself by making it less verbose.
Since Iām just looking for the Id I did it in a variable.
OLD:
state.performBooking.sessions.find((o,i) => {
if(o.Id === sessionData.Id){
state.performBooking.sessions.splice(i, 1)
}
})
NEW:
let localSessionIndex = state.performBooking.sessions.findIndex(o => o.Id === sessionData.Id)
state.performBooking.sessions.splice(localSessionIndex, 1)
Source:stackexchange.com