Fork me on GitHub

This is the last version that supports React 15/Reagent 0.7.0 and below. 0.4.0 will only support React 16/Reagent 0.8.0 and up


Hi there! We are using the re-frame-http-fx library to make xhr requests to an api server. Is there a way we can test our event handler, that uses the re-frame/reg-event-fx effect, by mocking the calls to the api server rather make the actual calls? We'd like to be able to run tests, especially the async ones that make xhr calls, even when we don't have connection to the internet. Any form of help will highly be appreciated.


Hi! I’m setting up a new project using shadow-cljs and Electron and am using re-frame-10x. When starting the app, the 10x panel opens, but it only shows the first epoch. I can see in the console log that at least one other event has occured, but it is not visible in 10x. What could be wrong?


@mark.ekisa_slack_cloj, in your tests, don't require re-frame-http-fx, and instead (reg-fx :http-xhrio (fn [cofx opts] ... your mock implementation )


your mock can then dispatch on-success and on-failure as needed


Thanks alot @danieleneal, I hadn't thought of that. I'll give a try.


Yes we do the same and it works


I also made it a test fixture (with a global atom keeping track of the calls to it) so it's easier to use in tests

👍 5

hi all, the re-frame-10x dev tools are not working for me, more specifically they do not seem to be responding to my "C-h" input


here is my project.clj

(defproject personal-web "0.1.0-SNAPSHOT"
  :min-lein-version "2.5.3" ;; needed for bidi
  :source-paths ["src/main/cljs"]
  :dependencies [[org.clojure/clojure "1.10.0"]
                 [org.clojure/clojurescript "1.10.516"]
                 [reagent "0.8.1"]
                 [re-frame "0.10.6"]
                 [bidi "2.1.5"]
                 [venantius/accountant "0.2.4"]
                 [org.roman01la/cljss "1.6.3"]]
  :aliases {"fig"       ;; launch figwheel REPL
            ["trampoline" "run" "-m" "figwheel.main"]
            "fig:build" ;; launch figwheel REPL using dev profile
            ["trampoline" "run" "-m" "figwheel.main" "-b" "dev" "-r"]
            "fig:min"   ;; minify project according to dev profile
            ["run" "-m" "figwheel.main" "-O" "advanced" "-bo" "dev"]}
  :profiles {:dev
              [[com.bhauman/figwheel-main "0.2.0"]
               [com.bhauman/rebel-readline-cljs "0.1.4"]
               [binaryage/devtools "0.9.10"]
               [ "0.3.7-react16"]]
              :source-paths   ["src/main/clj"]
              :main           "personal-web.core"
              :resource-paths ["target"]
              :clean-targets  ^{:protect false} ["target"]
              :compiler       {:closure-defines
                               {"re_frame.trace.trace_enabled_QMARK_" true}


and yes i am certain the focus is not in a text input when i enter "C-h"


What happens instead?


@danielcompton platform? mac/osx, google chrome - latest version (i think)