Chapter 7. Build Complex React Components
In this chapter, we'll put everything we learned so far about React components in action by building the most complex components in our application, that is, child components of our Collection
component. Our aim in this chapter is to gain a 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.react.js
file:
var React = require('react'); var Tweet = require('./Tweet.react.js'); var listStyle = { padding: '0' }; var listItemStyle = { display: 'inline-block', listStyle: ...
Get React.js Essentials 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.