Fork me on GitHub
#re-frame
<
2018-08-20
>
bmaddy15:08:26

I'm using re-posh and would like to see the datascript db (or a part of it) in side the app-db panel in re-frame-10x. Does anyone know how to do this? I'm currently only seeing an empty hash-map in there.

zalky18:08:21

@bmaddy: I'm unaware of anything that would allow you to easily do that, as a meaningful inspector would require far more than what is currently in re-frame-10x, something more like the Datomic console. Probably your best bet is just to inspect the db directly from your cljs repl. That way you can inspect it via queries or directly looking at the datoms list.

bmaddy18:08:23

Yeah, I wondered if it would quickly become not useful because of all the data. I was hoping there would be a way to have it display a single entity and expand refs kind of like (clojure.inspector/inspect-tree (d/entity ...)) would do. I suspect there is, but I'm too new to re-frame and 10x to really understand how they do things yet.

zalky04:08:24

@bmaddy: Gotcha. Don't know if you've tried Dirac Devtools (https://github.com/binaryage/dirac), but if not, could be worth installing and just printing a lazy entity map to the console. There's a chance the ref expansion works out of the box, depending on how it's implemented. Hope you figure something out! 🙂

bmaddy13:08:07

Oh, that looks interesting. I'll have to play with that some. Thanks @U0HJK8682!