Fork me on GitHub

What’s the best way to use datascript with om?


The examples I’ve seen re-render all components whenever the db changes.


@joshg: 1) that doesn't necessarily sound like a problem to me


2) haven't explored the om/datascript combo myself, but i think that sean grove may have some recent work worth a look here:


@jackjames: Thanks for the response. I’ll take a look at dato. I have an Om frontend and would like to use Datomic for the DB. I’ve looked at om-sync, but it seems like everything will change with Om Next.


Many people appear to be synchronizing state using Datascript locally


@joshg: if you can put it off, it sounds like a much clearer om + datascript story is fairly likely to emerge in the next few months (ish) w/ om-next


I need to get something working in the interim. I wish om-next was a little more baked.


@jackjames: do you know if om next will still make component local state available?


@joshg: i mean, i can't say that i know, but i would put it at about 100% chance that it will. the current incarnation of om-next certainly does so, and it's kind of a key piece of om's overall philosophy


Thanks, that’s good to hear. I didn’t see it in the defui examples and was wondering how to create components like drop-downs without local state.


yeah, not used in the examples, but def alive & well:


pkobrien: would you recommend using om next for an application today?


I saw that repo but the implementation seemed incomplete


@joshg: I would definitely not use om next for an app today, because dnolen would not recommend doing so. He is still fleshing it out and there are known parts that do not work. I think he said to expect a beta version by Clojure/conj, which is mid-November.


I would simply use Om, avoid the use of reference cursors, keep an eye on Om Next, and expect a modest transition burden to go from Om to Om Next.


That’s what I’ve done: build an om app without ref cursors, but I’m trying to figure out the best way to handle state with a datomic backend given that om next hasn’t been released. Would you build an API and pull updates on IWillMount? Another strategy seems to be syncing changes with a local Datascript store.


I posted that link mostly so that you could see that Om Next is definitely targeting Datascript as well as Datomic and the traditional atom/map.


@joshg: I'd ask that on the #C03RZMDSH channel


ok, thanks