rum

Simple, decomplected, isomorphic HTML UI library for Clojure and ClojureScript | 0.12.8 https://github.com/tonsky/rum/blob/gh-pages/CHANGELOG.md#0128
2017-11-03T14:49:05.000450Z

I'm wanting to use datascript as my global app state, but I'm not quite sure how to get components to update when the database updates. I could just make them rum/react on the datascript conn atom, but then everything updates whenever anything happens. Any ideas on how I could only make relevant components update? (Possibly by having to specify what components are going to need to update when doing a transaction)

2017-11-03T14:49:58.000112Z

I suppose a 're-run all queries' strategy could work for simple stuff.

2017-11-03T15:04:56.000465Z

Take a look at Posh library https://github.com/mpdairy/posh

2017-11-03T15:06:00.000390Z

AFAIK: it tries to be a bit more efficient by inferring changes from transaction log provided by DataScript

2017-11-03T15:07:42.000521Z

@roman01la Yeah, I've looked at posh. From what I could tell the idea didn't feel very clean, though perhaps I should take another look. Is it not tighly coupled to reagent?

2017-11-03T15:08:25.000266Z

@ghopper Haven’t tried it, so don’t really know about Reagent.

2017-11-03T15:08:50.000686Z

As for change inference, yes, some say it’s kinda working most of the times

2017-11-03T15:10:02.000182Z

Alright, perhaps I should consider just using a global atom with a map for my database.

2017-11-03T15:11:04.000282Z

@roman01la Does it makes sense to use a atom with a map and a lot of nested cursors for the state?

2017-11-03T15:12:07.000379Z

yes, that’s totally fine

2017-11-03T15:12:49.000574Z

I suppose I should try to keep it normalized somehow? Perhaps using om.next's database format.

2017-11-03T15:13:41.000497Z

yes, ideally state should be normalized, you can do this by hand if you want (not familiar with om.next’s format)

2017-11-03T15:13:59.000661Z

but basically this way you are modeling a DB 🙂

2017-11-03T15:14:09.000562Z

just without query language

2017-11-03T15:15:01.000305Z

Sounds good. Thanks 🙂