Closed p-himik closed 1 year ago
I would also add the fact that the diff parts are console-printed completely bare - i.e. as Objects. That is not very helpful, unless you have extra tooling in place... I would have expected everything to to be printed out as EDN, otherwise what's the point? How am I expected to make sense of these Objects? Is no-one else having this problem?
@jimpil Do you have cljs-devtools
installed?
That's the extra tooling I was referring to - I guess I can install it, but I kind of feel I shouldn't have to...
In an ideal world, CLJS runs directly in a browser. ;) But cljs-devtools
is a must-have tool - same as re-frame-10x
, React DevTools, shadow-cljs build report and so on.
Printing the EDN itself as a string would be much less useful - no interaction, potential data size issues, no proper representation for types that EDN doesn't handle, inability to drill down (e.g. you can right-click an expanded object when you have cljs-devtools
and save it in the global scope under its own name).
@jimpil I second the previous comment. cljs-devtools
is essential when doing anything in clojurescript.
Two fixes are possible:
(console :debug ...)
instead of (console :log ...)
js/console.log
not js/console.debug
)I note that approach 1 is a slightly breaking change.
Preferences?
Either way, the docstring should be adjusted to mention that it uses re-frame.core/console
rather than js/console
Going with fix number 2 for now. @mike-thompson-day8
The docstring says:
The actual implementation in
re-frame.std-interceptors
uses:Apart from using an incorrect level, the docstring also mentions
js/console
, which is incorrect.I'd argue that both places should use/mention
re-frame.core/console
. And definitely use/mention the same logging level, but whether:log
or:debug
I'm not sure.