Fork me on GitHub
#reagent
<
2017-06-17
>
cryan22:06:32

is there a way to query a component's local state via the repl? trying to figure out how to debug local state without manually hoisting it out of the component / print

urbank22:06:17

@cryan I don't know about inspecting component local state directly, but for debugging purposes you could cal (def debug-var local-atom). Perhaps this partly solves your problem

urbank22:06:18

Call def inside the component function I mean

cryan23:06:12

ah, yeah. i just felt bummed out that i lost all the debugging power that the react dev tool provided

urbank23:06:08

Well, this probably isn't hugely convenient, but you could just set the reagent.core/atom that represents your local state to the react state of the component.

urbank23:06:14

for debugging purposes

urbank23:06:09

every time you swap! or reset! the r/atom