Creating a selection view

First off we need our view in which we will perform the selection:

// demo/selectionView.js

import dispatcher from "./dispatcher";

console.log('selection view loaded');

class SelectionView {
selectIndex(index) {
console.log('selected index ', index);
dispatcher.dispatch({

type: "SELECT_INDEX",
data: index

});
}
}

const view = new SelectionView();
export default view;

We have bolded the   selectIndex()   method above that we intend to use.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.119.28.94