diff --git a/example/dev/example/dev.cljs b/example/dev/example/dev.cljs index 3ce63e82..422a986b 100644 --- a/example/dev/example/dev.cljs +++ b/example/dev/example/dev.cljs @@ -18,5 +18,5 @@ :on-jsload (fn [] ;; it can be helpful to touch the state on ;; reload to cause a re-render - (swap! core/app-state update-in [:__figwheel_counter] inc))}) + (swap! core/app-state update-in [:__figwheel_counter] (fnil inc 0)))}) diff --git a/examples/implicit-js-reloading/src/example/core.cljs b/examples/implicit-js-reloading/src/example/core.cljs index 91eded50..3afdd920 100644 --- a/examples/implicit-js-reloading/src/example/core.cljs +++ b/examples/implicit-js-reloading/src/example/core.cljs @@ -16,7 +16,7 @@ (defn on-js-reload [] ;; optionally touch your app-state to force rerendering depending on ;; your application - ;; (swap! app-state update-in [:__figwheel_counter] inc) + ;; (swap! app-state update-in [:__figwheel_counter] (fnil inc 0)) ) diff --git a/examples/separate-server/src/example/core.cljs b/examples/separate-server/src/example/core.cljs index 0bf412c0..eb22c76f 100644 --- a/examples/separate-server/src/example/core.cljs +++ b/examples/separate-server/src/example/core.cljs @@ -11,5 +11,5 @@ (defn on-js-reload [] ;; optionally touch your app-state to force rerendering depending on ;; your application - ;; (swap! app-state update-in [:__figwheel_counter] inc) + ;; (swap! app-state update-in [:__figwheel_counter] (fnil inc 0)) ) diff --git a/examples/using-ring-handler/src/example/core.cljs b/examples/using-ring-handler/src/example/core.cljs index 0bf412c0..eb22c76f 100644 --- a/examples/using-ring-handler/src/example/core.cljs +++ b/examples/using-ring-handler/src/example/core.cljs @@ -11,5 +11,5 @@ (defn on-js-reload [] ;; optionally touch your app-state to force rerendering depending on ;; your application - ;; (swap! app-state update-in [:__figwheel_counter] inc) + ;; (swap! app-state update-in [:__figwheel_counter] (fnil inc 0)) )