examples/reflux/js/store.js
function(list){
            localStorage.setItem(localStorageKey, JSON.stringify(list));
            // if we used a real database, we would likely do the below in a callback
            this.list = list;
            this.trigger(list); // sends the updated list to all listening components (TodoApp)
        }
function(list){
            localStorage.setItem(localStorageKey, JSON.stringify(list));
            // if we used a real database, we would likely do the below in a callback
            this.list = list;
            this.trigger(list); // sends the updated list to all listening components (TodoApp)
        }
function ( list ) { localStorage . setItem ( localStorageKey , JSON . stringify ( list ) ) ; // if we used a real database, we would likely do the below in a callback this . list = list ; this . trigger ( list ) ; // sends the updated list to all listening components (TodoApp) }
called whenever we change a list. normally this would mean a database API call
called whenever we change a list . normally this would mean a database API call