React js how to save the state of each inline input from a table?

I have a html table in react with columns containing student data and the final row containing an input when you can input the marks they got. I was wondering how I could save the state of each row without having to manually create a new state for each student as that would be inefficient as there’s always a different amount of students.

Thank you for any help!