Build Your First Production Quality React App

With the variety of choice we have in building modern web applications using JavaScript, it can make it difficult to understand where to even begin. We live in a wondrous era, where every problem we have seems to have a corresponding javascript module on npm that we can install with just a few keystrokes. It’s easy!

Often, “easy” can mean the opposite of simple. Easy is “quick to do”, where simple is “quick to understand”.

KISS.

In this course you will learn how to build production quality React applications. We will strive to keep things as simple as possible, with minimal dependencies. Instead of typing npm install, we will build our own simple solutions first, to get a solid understanding of the problems that we are solving through libraries. We will build our tools in a functional style, and write appropriate unit tests to verify that they work as expected.

If you are brand new to React, you’ll want to read the documentation and watch our free React Fundamentals course.

Watch User Created Playlist (24)

This playlist is user created.

pro-course-rss-logo

PRO RSS Feed

Bootstrap a React Application through the CLI with Create React App

Delete Data on the Server with fetch in React

P

Render a React UI with JSX

Render a React UI Based on Initial State

P

Synchronize React UI and State with Controlled Components

P

Create a Stateless Functional Component for an Input Form

P

Refactor React Components to be Stateless Functional Components

P

Validate Component Input with Prop Types in React

P

Add Data to a List without Mutations

P

Update React Application State from Form Input

P

Prevent Empty Form Values with Conditional Submit Handlers

P

Use ES2016 Property Initializer Syntax in ES6 classes

P

Update Data in a List without Mutations

P

Pass Data To Event Handlers with Partial Function Application

P

Create a Pipe Function to Enable Function Composition

P

Remove Items from a List without Mutations

P

Build a Link Component to Navigate to Routes in React

P

Use React Context to Manage Application State Through Routes

P

Filter Data on Property Values in React

P

Keep React Application State in Sync with Browser History

P

Load Data for React from a Server with fetch

P

Save Data to the Server with fetch in React

P

Show Temporary Messages in a React Application

P

Update Data on the Server with fetch in React

P
react tutorial about Bootstrap a React Application through the CLI with Create React App

Bootstrap a React Application through the CLI with Create React App

4:19 react

We’ll go from an empty directory to a solid foundation for an application by running a single command. The create-react-app tool handles all of the complicated setup for us so we can focus on building our application.

react tutorial about Delete Data on the Server with fetch in React

Delete Data on the Server with fetch in React

1:35 react PRO

We’ll use fetch to delete items on the server when the client triggers a removal, and update the UI with a success message once the delete operation on the server has succeeded.

react tutorial about Render a React UI with JSX

Render a React UI with JSX

2:48 react

We’ll dive right into JSX by rendering a static version of what our application will look like. We’ll cover the basic syntax of JSX and point out where it differs from html.

react tutorial about Render a React UI Based on Initial State

Render a React UI Based on Initial State

5:15 react PRO

We’ll define a simple state object in the constructor of the App Component class. Once the state has been defined, we’ll replace the static elements in our rendered output with values from the component’s state. We’ll move from static items to an array, seeing how we can use functions like map to render our UI.

react tutorial about Synchronize React UI and State with Controlled Components

Synchronize React UI and State with Controlled Components

3:41 react PRO

We’ll make the input field a “controlled component” by reacting to each change of the input and capturing it in the component state. Following this model gives us assurance that the UI is always a representation of the current application state.

react tutorial about Create a Stateless Functional Component for an Input Form

Create a Stateless Functional Component for an Input Form

3:37 react PRO

We’ll refactor our existing code, making the todo form a separate component. We’ll pass values from the App container into the new component via props. We’ll look at the differences between state and props in React and see how state can be passed down to other components as props.

react tutorial about Refactor React Components to be Stateless Functional Components

Refactor React Components to be Stateless Functional Components

6:42 react PRO

We’ll continue the refactoring effort and break the remaining pieces of the application into their own stateless functional components and see how components can be used within other components.

react tutorial about Validate Component Input with Prop Types in React

Validate Component Input with Prop Types in React

5:11 react PRO

React gives us a mechanism called PropTypes to ensure that the property values passed into components are of the correct type. By ensuring the correct data is passed to our components, we can avoid potential bugs and more confidently share components with a team or as open source libraries.

react tutorial about Add Data to a List without Mutations

Add Data to a List without Mutations

5:17 react PRO

In this lesson, we’ll create a utility function to add items to a list, avoiding mutation by returning a new array. We’ll verify this behavior by creating unit tests with Jest.

react tutorial about Update React Application State from Form Input

Update React Application State from Form Input

4:07 react PRO

We’ll add a handler to the form so we can take new input and use it to update the application state. We’ll append new items to the list with the AddTodo function and replace the todos list in state. We’ll also clear out our form so it can accept new todos.

react tutorial about Prevent Empty Form Values with Conditional Submit Handlers

Prevent Empty Form Values with Conditional Submit Handlers

5:37 react PRO

We’ll take advantage of the controlled nature of the todo input and the first class nature of javascript functions to dynamically assign the form submission handler. An empty todo will trigger a submission handler that is only concerned with handling an error state, and when the input is valid, the form will use the standard submit handler.

react tutorial about Use ES2016 Property Initializer Syntax in ES6 classes

Use ES2016 Property Initializer Syntax in ES6 classes

2:26 react PRO

Create react app provides support for es2016 property initializer syntax out of the box. In this lesson, we’ll refactor the App component to use property initializers and look at the advantages of this syntax.

react tutorial about Update Data in a List without Mutations

Update Data in a List without Mutations

7:10 react PRO

We’ll build small, focused functions to select an object from a list, apply updates to an object and replace an item in a list, avoid mutations to those objects along the way by returning new items that reflect our changes. We’ll verify this behavior by following a test driven approach using Jest.

react tutorial about Pass Data To Event Handlers with Partial Function Application

Pass Data To Event Handlers with Partial Function Application

8:39 react PRO

In this lesson we’ll see how to pass an item’s id value in an event handler and get the state to reflect our change. We’ll also create a helper function that allows us to use partial function application to clean up the event handler code and make it more “functional”

react tutorial about Create a Pipe Function to Enable Function Composition

Create a Pipe Function to Enable Function Composition

7:13 react PRO

In this lesson, we’ll refactor a series of function calls into a functional pipeline, making the code more declarative and removing the need for intermediate variables. Rather than reaching for a utility library, we’ll start by building our own pipe function to gain a clear understanding of how left-to-right function composition is accomplished in JavaScript.

react tutorial about Remove Items from a List without Mutations

Remove Items from a List without Mutations

5:31 react PRO

In this lesson, we’ll add the ability to remove items from our list. We’ll add some css to show a delete link while hovered over an item and handle a click event from the component to remove the corresponding item from the list by its id.

react tutorial about Build a Link Component to Navigate to Routes in React

Build a Link Component to Navigate to Routes in React

6:32 react PRO

In this lesson, we’ll create a Link component that manipulates the browser’s address bar using the history API’s pushState method.

react tutorial about Use React Context to Manage Application State Through Routes

Use React Context to Manage Application State Through Routes

7:51 react PRO

We’ll create a Router component that will wrap our application and manage all URL related state. We’ll see how we can use React’s built in context mechanism to pass data and functions between components without having to pass props all the way down through the component tree.

react tutorial about Filter Data on Property Values in React

Filter Data on Property Values in React

3:28 react PRO

We want to be able to show only items in a certain status so in this lesson, we’ll add a flag to indicate which items to show, and create a function to filter the todos based on that value. We’ll take advantage of route based state to control the filtering behavior.

react tutorial about Keep React Application State in Sync with Browser History

Keep React Application State in Sync with Browser History

1:43 react PRO

Using pushState and passing route data via context allows our application to respond to route changes made from Link components, but using the back and forward buttons in the browser doesn’t update the application state as we would expect. In this lesson, we’ll add event handling to our Router component to handle history popState events so routing behavior is maintained for the back and forward buttons.

react tutorial about Load Data for React from a Server with fetch

Load Data for React from a Server with fetch

4:19 react PRO

We’ll fire up json-server so we can run our application against a server. We’ll take advantage of the fetch polyfill provided by create-react-app and leverage the componentDidMount lifecycle event to load our initial todo list. We’ll also add an error message to our UI in the case that the server is unavailable.

react tutorial about Save Data to the Server with fetch in React

Save Data to the Server with fetch in React

2:30 react PRO

We’ll cover posting new data to the server using fetch and the POST http method. We’ll also update the UI with a success message once the save has completed successfully.

react tutorial about Show Temporary Messages in a React Application

Show Temporary Messages in a React Application

2:41 react PRO

We’ll add a message object to the application state and use that message to conditionally show a message component. We’ll also use a setTimeout to update our state and hide the message after a specified period of time.

react tutorial about Update Data on the Server with fetch in React

Update Data on the Server with fetch in React

3:09 react PRO

We’ll use fetch and refactor our client-side task completion logic to send an update to the server, and update the UI with a success message once the save has completed successfully.

HEY, QUICK QUESTION!
Joel's Head
Why are we asking?