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

To get the most out of this book

This book assumes that you have familiarity with basic web-based technologies, working knowledge of programming constructs in JavaScript, and a general idea of how React applications work. As you go through the book, you will uncover how these concepts come together when building fully-fledged web applications with React 16.13.1, Node.js 13.12.0, Express 4.17.1, and MongoDB 4.2.5.

In order to maximize your learning experience while reading through the chapters, it is recommended that you run the associated application code in parallel, maintaining the specified package versions and using the relevant instructions provided in each chapter.

If you are using the digital version of this book, we advise you to type the code yourself or access the code via the GitHub repository (link available in the next section). Doing so will help you avoid any potential errors related to the copying and pasting of code.

Download the example code files

You can download the example code files for this book from your account at www.packt.com. If you purchased this book elsewhere, you can visit www.packtpub.com/support and register to have the files emailed directly to you.

You can download the code files by following these steps:

  1. Log in or register at www.packt.com.
  2. Select the Support tab.
  3. Click on Code Downloads.
  4. Enter the name of the book in the Search box and follow the onscreen instructions.

Once the file is downloaded, please make sure that you unzip or extract the folder using the latest version of:

  • WinRAR/7-Zip for Windows
  • Zipeg/iZip/UnRarX for Mac
  • 7-Zip/PeaZip for Linux

The code bundle for the book is also hosted on GitHub at https://github.com/PacktPublishing/Full-Stack-React-Projects-Second-Edition. In case there's an update to the code, it will be updated on the existing GitHub repository.

We also have other code bundles from our rich catalog of books and videos available at https://github.com/PacktPublishing/. Check them out!

Conventions used

There are a number of text conventions used throughout this book.

CodeInText: Indicates code words in text, database table names, folder names, filenames, file extensions, pathnames, dummy URLs, user input, and Twitter handles. Here is an example: "Mount the downloaded WebStorm-10*.dmg disk image file as another disk in your system."

A block of code is set as follows:

addItem(item, cb) {
let cart = []
if (typeof window !== "undefined") {
if (localStorage.getItem('cart')) {
cart = JSON.parse(localStorage.getItem('cart'))
}
cart.push({
product: item,
quantity: 1,
shop: item.shop._id
})
localStorage.setItem('cart', JSON.stringify(cart))
cb()
}
}

When we wish to draw your attention to a particular part of a code block, the relevant lines or items are set in bold:

<Grid container spacing={24}>
<Grid item xs={6} sm={6}>
<CartItems checkout={checkout}
setCheckout={showCheckout}/>
</Grid>
{checkout &&
<Grid item xs={6} sm={6}>
<Checkout/>
</Grid>}
</Grid>

Any command-line input or output is written as follows:

yarn add --dev @babel/preset-react 

Bold: Indicates a new term, an important word, or words that you see onscreen. For example, words in menus or dialog boxes appear in the text like this. Here is an example: "Select System info from the Administration panel."

Warnings or important notes appear like this.
Tips and tricks appear like this.