September 2017
Intermediate to advanced
216 pages
6h 8m
English
The first piece of state that we'll look at is the episode search results. This is the focal point of the application, so this is where we'll see the most action. For example, it would make sense to store the list of all episodes here. Also, we'll want to keep track of the states of the various filter controls here:
const app = App( Map.of( 'results', Map.of( 'episodes', List.of( Map.of( 'title', 'The National Anthem', 'date', 'December 4 2011', 'director', 'Otto Bathurst', 'rating', 8.0 ), ... ), 'query', '', 'title', true, 'director', false, 'date', false, 'rating', 7 ), ));
Inside the results state, we have the list of episodes. We also have the filter control states. The query state is an empty string initially, because the ...
Read now
Unlock full access