June 2016
Intermediate to advanced
910 pages
18h 59m
English
Where do we start refactoring our React components? Let's start with the uppermost React component in our components hierarchy, Application.
At the moment, our Application component stores and manages the collection of tweets. Let's remove this functionality, as it's now managed by the collection store. Remove the getInitialState(), addTweetToCollection(), removeTweetFromCollection(), and removeAllTweetsFromCollection() methods from the Application component:
var React = require('react'); var Stream = require('./Stream.react'); var Collection = require('./Collection.react'); var Application = React.createClass({ render: function () { return ( <div className="container-fluid"> <div className="row"> <div className="col-md-4 ...Read now
Unlock full access