Let's do a reality check here. We haven't built the Flux flow as prettily as we could make it. The overall picture is correct but it'd be nice if we can clean it up a bit to make room for more actions so we get a real sense of how the application should grow from here.
Adding more actions to our flow
Cleaning up the view
The first order of business is to have a look at our first view and how it reacts to user interactions. It looks like this currently:
// first.view.js
import dispatcher from "./dispatcher";
class FirstView {
selectIndex(index) {
dispatcher.dispatch({
type: "SELECT_INDEX",
data: index
});
}
}
let view = new FirstView();
Adding a few more actions into the mix...