mirror of
https://github.com/BoostIo/Boostnote
synced 2025-12-13 17:56:25 +00:00
24 lines
400 B
JavaScript
24 lines
400 B
JavaScript
var Reflux = require('reflux')
|
|
|
|
var actions = Reflux.createActions([
|
|
'update',
|
|
'destroy'
|
|
])
|
|
|
|
module.exports = Reflux.createStore({
|
|
listenables: [actions],
|
|
onUpdate: function (user) {
|
|
this.trigger({
|
|
status: 'userUpdated',
|
|
data: user
|
|
})
|
|
},
|
|
onDestroy: function (user) {
|
|
this.trigger({
|
|
status: 'userDestroyed',
|
|
data: user
|
|
})
|
|
},
|
|
Actions: actions
|
|
})
|