We will apply the React 360 concepts and use the game data structure to implement the game features for each game in the MERN VR Game application. For these implementations, we will update the default starter code generated in the index.js and client.js files within the initiated React 360 project.
For a working version of the game, we will start with the MERNVR component's state that was initialized using the sample game data from the previous section.
The MERNVR component is defined in index.js, and the code will be updated with the game data in state, as shown in the following code:
/MERNVR/index.js
export default class MERNVR extends React.Component {
constructor() {
super()
this.state = {
game: sampleGameData
...
}
}
...
}
This will make the sample game's details available...