May 2018
Intermediate to advanced
470 pages
13h 54m
English
When any of the VR object details are changed in the input fields, the handleChange method will update the state of the VRObjectForm component, and use the handleUpdate method passed as a prop from GameForm to update the VR object in the GameForm state with the changed value for the object detail.
mern-vrgame/client/game/VRObjectForm.js:
handleChange = name => event => { this.setState({[name]: event.target.value}) this.props.handleUpdate(this.props.index, this.props.type, name, event.target.value) }
With this implementation, the create and edit game forms are in place, complete with VR object input forms for arrays of varying sizes. Any registered user can use these forms to add and edit games on the MERN VR ...
Read now
Unlock full access