Created
          October 17, 2017 16:12 
        
      - 
      
 - 
        
Save georgesboris/6ed773676b9814ef2b6cf842cc9f8222 to your computer and use it in GitHub Desktop.  
    firebase-app - test - app flow
  
        
  
    
      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 { applyAction } = require('../firebase-app'); | |
| // create our local database | |
| let db = {}; | |
| // first user signs up and creates the first post | |
| db = applyAction(createUser, createUserPayload, db); | |
| db = applyAction(createPost, createPostPayload, db); | |
| db = applyAction(updatePost, updatePostPayload, db); | |
| // a second user signs up, comments and likes the first user post | |
| db = applyAction(createUser, createSecondUserPayload, db); | |
| db = applyAction(commentPost, commentPostPayload, db); | |
| db = applyAction(likePost, likePostPayload, db); | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment