Chapter 8. Building Complex React Components

In this chapter, we'll put everything you learned so far about React components in action by building the most complex components in our application, that is, the child components of our Collection component. Our aim in this chapter is to gain solid React experience and grow our React muscle. Let's get started!

Creating the TweetList component

As you know, our Collection component has two child components: CollectionControls and TweetList.

We'll first build the TweetList component. Create the following ~/snapterest/source/components/TweetList.js file:

import React, { Component } from 'react'; import Tweet from './Tweet'; import TweetUtils from '../utils/TweetUtils'; const listStyle = { padding: '0' }; const ...

Get React 16 Essentials - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.