om

Please ask the channel first, not @dnolen directly!
sundarj 2017-07-12T01:16:51.342233Z

it took some hammock & repl time, but i managed to get there in the end. thank you kindly for the help 🙂 https://github.com/sundarj/hiki/commit/99e1b8e4639f2a783d3a5286bbe61f1dff8bf05d

gardnervickers 2017-07-12T01:21:56.405267Z

@sundarj it will just normalize a tree of data to the default Om.next db format. It does the opposite of generating trees, it generates a graph.

gardnervickers 2017-07-12T01:22:45.415113Z

db->tree will generate your UI tree (or a subtree) depending on the query you pass into it.

sundarj 2017-07-12T01:24:04.431413Z

yeah sorry about that, i was being a bit fast and loose with my terminology there. i managed to get it working in the end (with a hefty dose of hammock & repl time): https://github.com/sundarj/hiki/commit/99e1b8e4639f2a783d3a5286bbe61f1dff8bf05d

sundarj 2017-07-12T01:24:40.438778Z

suspect there is a better approach than using a reset!, but it works for now

gardnervickers 2017-07-12T01:27:24.472822Z

Cool, we've found (merge-with merge to work well for most cases where we want to merge the results of tree->db back into your app state.

sundarj 2017-07-12T01:29:27.498258Z

did not know about merge-with! nice one :thinking_face:

sundarj 2017-07-12T01:48:31.732225Z

https://github.com/sundarj/hiki/commit/f33c5c3db3087c19c263671da9cbc68b8b5346ce dont need merge-with since it's just merging into {:playlists nil}, but this is much nicer. thanks!

baptiste-from-paris 2017-07-12T18:31:55.344208Z

hello friends, can someone explain to me what is a typical use case for (om/react-type some-component) ?