1234567891011121314151617181920212223 |
- (ns automata.core
- (:require [reagent.core :as reagent :refer [atom]]))
- (enable-console-print!)
- (println "This text is printed from src/automata/core.cljs. Go ahead and edit it and see reloading in action.")
- ;; define your app data so that it doesn't get over-written on reload
- (defonce app-state (atom {:text "Hello world!"}))
- (defn hello-world []
- [:h1 (:text @app-state)])
- (reagent/render-component [hello-world]
- (. js/document (getElementById "app")))
- (defn on-js-reload []
- ;; optionally touch your app-state to force rerendering depending on
- ;; your application
- ;; (swap! app-state update-in [:__figwheel_counter] inc)
- )
|