Single Responsibility Components: Object-Oriented Design in React

Video by Front End Center

The Functional Programming (FP) aspects of React are fairly prominent, but components themselves are an example of Object-Oriented (OO) programming. In this episode, we'll look at how one idea from OO—The Single Responsibility Principle—can help us design and extract more readable, reusable, and maintainable React components.

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

Compound React Components with Hooks + TypeScript

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 [continue]

Tutorial by Martin Di Diego

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