Updating the game code in React 360

With the game backend all set up in the MERN application, we can update the React 360 project code we developed in Chapter 10Developing a Web-Based VR Game, to make it render games directly from the game collection in the database.

We will use the game ID in the link that opens the React 360 application to fetch game details with the read API from within the React 360 code, and then set the data to state so the game loads details retrieved from the database instead of the static sample data we used in Chapter 10Developing a Web-Based VR Game.

Once the code is updated, we can bundle it again and place the compiled files in the MERN application.

Get Full-Stack React Projects now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.