Each VRObjectForm component can also be deleted to remove the object from the given array. GameForm will pass a removeObject method to the VRObjectForm component as a prop so the array can be updated in state when a user clicks delete on a specific VRObjectForm.
mern-vrgame/client/game/GameForm.js:
removeObject = (type, index) => event => { const newGame = this.state.game newGame[type].splice(index, 1) this.setState({game: newGame}) }
The object will be removed from the array by slicing at the given index from the array of the specified array type in name.