1.Introduction to React
Video preview
Learning Objectives
Discover what React is and the problems it solves when designing UIs and web applications. Get your first hands-on experience with React. Discover the create-react-app utility that generates a React development toolchain for an incredible developer experience.
Topics
Play Video
What is React?
Hello React
Using the create-react-app
Hands-On
Build an app that allows the user to key in text which it reverses and displays on the UI instantaneously.
2.Components
Video preview
Learning Objectives
Gain an insight into components, the building blocks of a React application. Learn about the two main types of components that you can build with React including a conceptual look at state and event listeners. Discover JSX, an HTML like syntax that allows you to express your UI within a React component.
Topics
Play Video
What are Components?
Types of Components
JSX
Hands-On
Create a class component that lets you type text in a
3.State and Props
Video preview
Learning Objectives
Learn about state which allows you to describe changes to your UI using data.
Learn about the fundamentals of the Hooks API that lets you incorporate state in a Function component.
Understand how to use props as conduits that allow you to pass data from a parent to a child component.
Learn to debug props using type checking.
Topics
Play Video
What is State?
Stateful Function Components with Hooks
What are props?
Type Checking with Prop Types
Hands-On
Create a toggle button for a hypothetical space-craft’s guidance system panel
Build a simple theme switcher using state in a function component using the Hooks API
Work on a component called UserCard which has to accept data using props
Implement prop type checks in the UserCard component we built earlier
4.Rendering Lists
Video preview
Learning Objectives
Learn to render lists of components using the map() method. Understand the importance of the ‘key’ attribute. Learn to use the fragments feature for rendering multiple top level components
Topics
Play Video
Using the map function to render lists
The “key” attribute
Using Fragments
Hands-On
Use the map function to render lists of components using an Array of movies and set all important ‘key’ prop
Implement the Fragment operator in a React Component instead of an enclosing div element
5.Components Revisited
Video preview
Learning Objectives
Understand the lifecycle of a component and how it can be harnessed.
Learn to integrate side effects such as fetching data from an API, in a React component. Learn to deal with side effects that require cleanup, such as using Timers. Understand React’s SyntheticEvent system.
Learn about managing errors gracefully using Error Boundaries.
Topics
Play Video
Lifecycle of a Component
Side effects and Lifecycle
Managing cleanup
Events
Error Management
Hands-On
Implement the componentDidMount lifecycle method to bring in data from a mock weather service
Implement the componentDidUpdate lifecycle method to update the data
Implement componentWillUnmount lifecycle function to tear down the timer instance in an app
Work with events to set state properties
Implement an Error Boundary component to intercept errors in child components
6.Building Forms
Learning Objectives
Learn to build form elements that are controlled by React. Learn to fetch form data directly from the DOM. Implement debouncing and other techniques to efficiently handle multiple form elements.
Topics
Controlled Form Components
Uncontrolled Form Components
Handling inputs efficiently
Project – Building a currency converter
Hands-On
Turn an input element into a controlled component
Implement refs to pull and set data to DOM elements when needed
7.Render Props and Higher Order Components
Learning Objectives
Implement shared logic using render props. Learn to reuse component logic using the HOC pattern.
Topics
Render Props
Higher Order Components
Hands-On
Create a Currency-Converter component that implements render props to provide the result which is then rendered on the screen
Build a higher order function that empowers our App component with tools to fetch currency rates after conversion
8.Portals
Learning Objectives
Learn to render children in a DOM node that is outside of the parent’s DOM hierarchy. Understand how event bubbling works with Portals.
Topics
Introduction to Portals
Event bubbling in Portals
Hands-On
Work with Portals to render a dialog box component in a DOM element other than the root div where the React app is mounted
9.Global and Shared Data
Learning Objectives
Understand the nuances of data flow in a React application, and the issues with sharing global data using props in a deeply nested application. Learn and understand all about the Context API that lets you share global data without using props.
Topics
Unidirectional Data Flow
Challenges with Props
The Context API
Hands-On
Instantiate a context, and provider and consumer components to trickle data down to the component hierarchy
10.Hooks in Focus
Learning Objectives
Get an introduction to the Hooks API and the motivation behind them. Learn to incorporate stateful properties in a function component using the useState() hook. Learn to ingest data from a Context provider using hooks and to implement the useReducer() hook. Finally, learn to write your own hook.
Topics
Understanding Hooks
The useState hook
Side effects using the useEffect hook
The useContext hook
The useReducer hook
Writing your own hook
Hands-On
Build a PowerTags component that can be used to dynamically add/remove tags or keywords
Use the useEffect function to fetch data from a stock app
Implement the useContext hook to consume data from a context provider
Use the useReducer hook to offload state management and define actions and their
resulting state changes
Build a custom hook named ‘useGeoLocation’ which accesses the HTML5 GeoLocation API
to continually fetch the latitude and longitude of the user’s location
11.Routing in a React App
Video preview
Learning Objectives
Understand Routing in a React application, and learn about Dynamic Routing and Setup React Routers. Implement nested routing and use query parameters. Learn to protect routes from unauthenticated access.
Topics
Play Video
Routing in a React application
Routing with React Router
Nested Routes and Parameters
Protecting Routes
Hands-On
Integrate React router in a project that features multiple sections
Incorporate nested routing on the /books route so that details of books
Protect a route from unauthenticated access
12.Code Splitting
Learning Objectives
Learn to optimize your production bundle by implementing code splitting using dynamic imports and the Suspense API. Learn to implement code splitting, lazy loading and suspense when working with React Router.
Topics
Code splitting and Suspense
Route Based Code Splitting and Lazy Loading
Hands-On
Implement React.lazy and Suspense to load two components when needed
Implement React.lazy and Suspense when working with React Router
13.Isomorphic React
Learning Objectives
Understand the need for server-side rendered apps. Learn to setup a Node.js (Express) server for rendering React apps on the server. Build a toolchain using Webpack and Babel to compile React code on the server and for the client.
Topics
Server-Side Rendering
SSR with React – Setup and Server
SSR with React – The Toolchain
14.State Management using Redux
Learning Objectives
Understand the need for a dedicated state management solution and discover Redux. Take your first steps with Redux as you install, setup and connect it to a React application. Learn to build action creators and add mutation logic in the reducer for the Catalog component.
Next, you will learn to use the connect() higher order function to interface React components with the store. You will be able to build action creators and complex state mutation logic for the Cart component. Learn to use Redux hooks and implement optimizations for performance. Also learn to implement middleware, async action creators and data persistence.
Topics
State Management and Redux
Setting up Redux
Actions and Reducer for the Catalog
Using the connect() higher-order function
Actions and Reducer for the Cart
Using Redux Hooks
Implementing Middleware and Persistence
15.Testing Components
Learning Objectives
Understand the role of testing in application development. Learn to use Jest with test-utils from the React-DOM library for writing unit and integration tests. Next, learn to write tests using Jest and the React Testing Library. Finally, learn about React Testing Library, a framework for testing React Components.
Topics
Introduction to Testing
Using Jest with Test Utils from React-DOM
Using Jest with the React Testing Library
Using Jest with Enzyme