/thinking-in-react-higher-order-components

Source code for Tuts+ Course

Primary LanguageJavaScriptBSD 2-Clause "Simplified" LicenseBSD-2-Clause

Instructor: Jeremy McPeak

Using higher order components let's you enhancing React components without the constraints and problems of inheritance. If you're familiar with functional programming, you might have heard of higher order functions. Higher order components work in much the same way and they are the preferred way to share and reuse functionality for React components.

In this Coffee Break Course, Jeremy McPeak will teach you all about higher order components. You'll learn how a higher order component is just a function that takes an existing component and returns another component that wraps around it. You'll see how this is superior to inheritance and how it allows you to build enhancements or extensions that can be applied to any component. Along the way you'll see a few examples of how to code a higher order component and you'll see some real-world examples of how they can be useful.

Source Files Description

This repository contains the example source code for the course: a few simple higher order components for React and an example of how they can be used.


These are source files for the Envato Tuts+ course: Thinking in React: Higher Order Components

Available on Tuts+. Teaching skills to millions worldwide.