Compound React Components with Hooks + TypeScript

Tutorial by Martin Di Diego

When writing React components, it always pays off to spend a little bit of time thinking about how another developer would use them. In this post, I'd like to dive a bit into Compound Components, a pattern for creating components that I've found to be a joy to use both as a creator and consumer. We'll be creating a small <Tabs> component with TypeScript and Context Hooks.

Related resources

A guide to React refs: useRef and createRef

As is the case with many other UI libraries, React offers a way to rethink a view as the result of a state of a component. Part of that benefit comes from creating the views with the abstraction mechanisms React and JSX expose instead of doing it through DOM spec methods. Still, the React team did [continue]

Article by Jeremias Menichelli

Learn React By Making a Countdown Timer

This guide aims to help those familiar with DOM manipulation with jQuery to learn and transition to coding in React. We will be building a countdown timer in React and comparing it to a functionally similar version built with jQuery. [continue]

Tutorial by codethesite

How To Master Advanced React Design Patterns: Compound Components

To celebrate the official release of React 16.3, I have decided to share some techniques I have been using recently which have completely changed my approach to creating React components. Using these techniques I am able to design components that are completely reusable, and have the flexibility to use [continue]

Tutorial by Shaun David Hutch

How To Master Advanced React Design Patterns: Render Props

In this tutorial, we will discuss the 'render props' design pattern. This design pattern can be a bit of a head scratcher at first and in order to truly grasp how it exactly works, we need a in-depth understanding of the top level React API and how the JSX code we write is converted to javascript. So [continue]

Tutorial by Shaun David Hutch