Created
May 16, 2017 08:00
-
-
Save arqex/30832c12d2d73daa6934762a1f0b9cdc to your computer and use it in GitHub Desktop.
Message reaction 2
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
freezer.on('message:loadAll', () => { | |
freezer.get().set({status: 'LOADING'}); | |
Ajax.get('/messages').then( messages => { | |
freezer.get.set({ | |
status: 'READY', | |
messages: messages | |
}); | |
// Some other reactions might be listening to this | |
freezer.emit('message:loaded', messages ); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment