day8 / re-frame-10x

A debugging dashboard for re-frame. X-ray vision as tooling.
MIT License
631 stars 68 forks source link

Have Appdb state at startup #263

Closed stumitchell closed 9 months ago

stumitchell commented 4 years ago

Currently when I wish to look at appdb and press ctrl-h I see the following Screenshot 2020-05-14 at 21 00 17

The only way to get state is to trigger another event.

kimo-k commented 9 months ago

I added a workaround for now. If you include the closure-define day8.re-frame-10x.init-event? true, then 10x will dispatch an event in the client re-frame which should cause the 10x UI to sync up.

See how the example project does it: https://github.com/day8/re-frame-10x/blob/071448858cc9a4e22ac2a1adf8e2e1b48d2ec775/examples/todomvc/shadow-cljs.edn#L32

kimo-k commented 9 months ago

Now dispatch-sync emits a special trace to let 10x know that it has finished. You can upgrade your project to re-frame 1.4.1 to make this work. I think this particular bug is solved, but I'm still on the lookout for related bugs.