When using my deleteHandler function in pinia, I noticed an issue where the users array was not being re-rendered even though the state changed in vue devtools. Interestingly, if I modify values within the array instead of deleting an object from it, Vue recognizes the change and successfully re-renders the component. Simply deleting the object does not trigger the re-render.
const deleteHandler = (user) => {
//deleting an object doesn't render
useUser.users = useUser.users.filter(usr => usr.id !== user.id)
//modifying values works and triggers a re-render
useUser.users.forEach(usr => {
usr.points += 1
})
}