Fork me on GitHub
#re-frame
<
2024-02-08
>
Ryan20:02:19

Is there a way to dispatch an event from the js console OR obtain slice of app-db? Have a debug event in prod (so no re-frame-10x or similar) that copies a slice of state to clipboard for making easy bug reports.

p-himik20:02:53

Nothing you can do in prod without some extra things since everything's minimized. One such "extra thing" could be something like:

(ns app.whatever
  (:require [re-frame.core])

(defn ^:export copy-state []
  (rf/dispatch [:copy-state]))
And then from the JS console you'd be able to call app.whatever.copy_state().

🙏 1