Currently there is hydrator add! and subtract!. I am changing their name to watch and unwatch respectively. One of the big goals here is to align the reference (the location in firestore) with the path (the location in your clients application). Currently the code to add and subtract has a kind of complex notion of a prefix for both :firemore & :firestore that is a bit complicated.
Currently there is hydrator
add!
andsubtract!
. I am changing their name towatch
andunwatch
respectively. One of the big goals here is to align the reference (the location in firestore) with the path (the location in your clients application). Currently the code to add and subtract has a kind of complex notion of a prefix for both:firemore
&:firestore
that is a bit complicated.;; THE BIG IDEA
;; [:cities "SF"] ;; [:cities {}] ;; [:cities {:where [[:population "<=" (* 1000 1000)]]}]
;; (add app-db [:cities {:where [[:favorite? "=" true]]}]) ;; => app-db looks like ;; {:cities ;; {{:where [[:favorite? "=" true]]} [ ]}}
;; (add app-db [:cities {:where [[:favorite? "=" true]]}] [:favorite-cities]) ;; => app-db looks like ;; {:favorite-cities [ ]}
;; Dealing with a atom (Reagent): ;; (watch! ratom) OR (add! ratom )