So I am working on a movie app for my friends and I. I have a previous post about a similar issue but I'm now having a different issue trying to update the state of my movieList with useContext and arrays
Here is my useContext array structure:
{
id: 0,
name: "Alpha",
ranking: "0"
},
{
id: 1,
name: "Bravo",
ranking: "0"
},
{
id: 2,
name: "Charlie",
ranking: "0"
},
]);
I already have the ability to add new movies with default id and ranking values but I want the app to go to a "voting" page where we all submit a vote and the movies ranking value is updated using an input box.
I'm not sure how I can update the state of this. I know I have to use an onChange method but every time I do call movieList it's not defined as an array