You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Some sugar for simple stores. It implements handleAdd, handleRemove, handleEmpty, getState, emptyWhere, setCollectionName.
varTodoStore=Fluxxor.createCollectionStore({actions: {"ADD_TODO": "handleAdd","TOGGLE_TODO": "handleToggleTodo","CLEAR_TODOS": "handleClear"},initialize: function(){// provide the property name to fluxxorthis.setCollectionName("todos");},handleToggleTodo: function(payload){payload.todo.complete=!payload.todo.complete;this.emit("change");},handleClear: function(){this.removeWhere(function(todo){returntodo.complete;});this.emit("change");},});
The text was updated successfully, but these errors were encountered:
Some sugar for simple stores. It implements
handleAdd
,handleRemove
,handleEmpty
,getState
,emptyWhere
,setCollectionName
.The text was updated successfully, but these errors were encountered: