cch5ng / recipe-box-firebase

Recipe application using Firebase backend and Google login.
http://cch5ng.github.io/recipe-box-firebase
0 stars 2 forks source link

addRecipe db update overwrites existing recipe ingred/steps #2

Closed cch5ng closed 8 years ago

cch5ng commented 8 years ago

think I need to do db update in two steps b/c of the flat structure...

cch5ng commented 8 years ago

not clear why the new name seems to get added 2x; is this an issue with state update?

cch5ng commented 8 years ago

going to revert to a db structure like... this is going to break the UI temporarily

recipes: [
    id1: {
        name: 'rec name',
        owner: 'me',
        ingredients: ['ing1', 'ing2'],
        steps: ['step1', 'step2']
    },
    id2: {}
]
cch5ng commented 8 years ago

might later want to index recipes by owner

cch5ng commented 8 years ago

ex how to manage this binding between firebase ref and react component

https://github.com/firebase/ReactFire/blob/master/examples/todoApp/js/todoAppFirebaseExplicit.js

cch5ng commented 8 years ago

current issue with this.state.xxx

looks like es6 is incompatible w/ react mixins (and fb doesn't plan to update reactfire to be es6 compatible; focus is on react native)

https://www.firebase.com/docs/web/libraries/react/guide.html

reactfire mixin http://egorsmirnov.me/2015/09/30/react-and-es6-part4.html

cch5ng commented 8 years ago

fixed: 637815cd6823c4dfe0de2cb62d3898d0e8c1707a