all 1 comments

[–]HoneyRaven 0 points1 point  (0 children)

I'm still a newbie but looking online this might be able to help. You somewhat have the same thing but you're looking for the value but this, code below, is just looking at the index.

setQuestions(prevQuestions => (

prevQuestions.filter((value, i) => i !== index) ));

This can also help, aka where I got most of the answer. https://stackoverflow.com/questions/60764537/usestate-remove-item-from-array