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
@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.
db->tree
will generate your UI tree (or a subtree) depending on the query you pass into it.
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
suspect there is a better approach than using a reset!
, but it works for now
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.
did not know about merge-with
! nice one :thinking_face:
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!
hello friends, can someone explain to me what is a typical use case for (om/react-type some-component)
?