September 2017
Intermediate to advanced
216 pages
6h 8m
English
The actual side-effect that renders the episode results is similar, but with a few React subtleties. For one thing, the filter() function that composes the filter() iteratee is now a method of the app component:
class App extends React.Component { filter(query) { return every( some( () => query === undefined, () => query === '', every( () => this.state.title, v => v.get('title').includes(query) ), every( () => this.state.date, v => v.get('date').includes(query) ), every( () => this.state.director, v => v.get('director').includes(query) ) ), v => v.get('rating') >= (+this.state.rating) ); } ...}
This is necessary because instead of depending on DOM nodes for state, we need to check things such as this.state.director ...
Read now
Unlock full access