Fork me on GitHub

I don't know if the watcher will be destroyed, but you can use a finally for with-let


Thank you, didn’t see it.


I answered by myself.


For those have used re-posh (, did you end up storing all of your app-state exclusively in Datascript or did you split it between re-frame's app-db & re-posh's app-db?


I'm asking b/c some things seem awkward -- for instance, having a subscription to the current :modal. Datalog won't let you use nil values, so you must set :modal :none instead. For getting "update in place" on the modal entity, you'll need to pass an entity-id. Recall that datoms are tuples of [entity-id key value], so you either: A) hardcode UI to a specific entity-id to leverage datascript "upsertion" (overwrites prior entity keys) B) subscription query must filter to the chronological latest of all transacted :myapp/modal entities


I’ve never used re-posh (thanks for highlighting it!), but if it’s like Datomic, I would probably create a modal entity and give it an ID as an attribute, then select it from the DB with that ID as a parameter to the query.


I.e., based on the application-logic ID, get the Datomic-internal-plumbing-ID, then use that to target the Datom in the transaction.

👍 4