Created
March 22, 2017 16:31
-
-
Save aakashns/365d3cdb59f58fb91b5631579d97063a to your computer and use it in GitHub Desktop.
First version of fromDb
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
| const fromDb = (db, dispatch) => { | |
| db.ref('/message').on('value', data => { | |
| if (data.val()) { | |
| dispatch({ type: 'SET_MESSAGE', payload: data.val() }); | |
| } | |
| }); | |
| }; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment