April 2020
Intermediate to advanced
716 pages
18h 55m
English
For each array rendered in the game form, we will add a button that will let users push new VR objects to the given array. This button to add an object will render a new VRObjectForm component to take the details of a new VR object. We will add this button to the ExpansionPanelDetails component after the iteration code, as shown in the following code:
mern-vrgame/client/game/GameForm.js:
<ExpansionPanelDetails>... <Button color="primary" variant="contained" onClick={addObject('answerObjects')}> <AddBoxIcon color="secondary"/> Add Object </Button></ExpansionPanelDetails>
This ADD OBJECT button will render at the end of each list of VR object forms. When clicked on, it will add a new blank VR object form by ...
Read now
Unlock full access