Book Image

Full-Stack React Projects - Second Edition

By : Shama Hoque
2 (1)
Book Image

Full-Stack React Projects - Second Edition

2 (1)
By: Shama Hoque

Overview of this book

Facebook's React combined with industry-tested, server-side technologies, such as Node, Express, and MongoDB, enables you to develop and deploy robust real-world full-stack web apps. This updated second edition focuses on the latest versions and conventions of the technologies in this stack, along with their new features such as Hooks in React and async/await in JavaScript. The book also explores advanced topics such as implementing real-time bidding, a web-based classroom app, and data visualization in an expense tracking app. Full-Stack React Projects will take you through the process of preparing the development environment for MERN stack-based web development, creating a basic skeleton app, and extending it to build six different web apps. You’ll build apps for social media, classrooms, media streaming, online marketplaces with real-time bidding, and web-based games with virtual reality features. Throughout the book, you’ll learn how MERN stack web development works, extend its capabilities for complex features, and gain actionable insights into creating MERN-based apps, along with exploring industry best practices to meet the ever-increasing demands of the real world. By the end of this React book, you’ll be able to build production-ready MERN full-stack apps using advanced tools and techniques in modern web development.
Table of Contents (22 chapters)
1
Getting Started with MERN
4
Building MERN from the Ground Up
8
Developing Web Applications with MERN
13
Advancing to Complex MERN Applications
19
Going Forward with MERN

Building the game view in React 360

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...