Skip to content
Permalink
Browse files

Step 12 - Add Reagent

  • Loading branch information...
tkjone committed Jun 19, 2019
1 parent 205c680 commit f13ee9b6512873e0ba91061e6874cc655e2168e9
Showing with 23 additions and 5 deletions.
  1. +3 −1 deps.edn
  2. +2 −1 resources/public/index.html
  3. +1 −1 resources/public/style.css
  4. +17 −2 src/tallex/time_dive.cljs
@@ -4,7 +4,9 @@
:deps
{org.clojure/clojurescript {:mvn/version "1.10.520"}

com.bhauman/figwheel-main {:mvn/version "0.2.0"}}
com.bhauman/figwheel-main {:mvn/version "0.2.0"}

reagent {:mvn/version "0.8.1"}}

:aliases
{:dev {:main-opts ["-m" "figwheel.main" "--build" "dev" "--repl"]}}}
@@ -5,7 +5,8 @@
<link rel="stylesheet" type="text/css" href="style.css" />
</head>
<body>
<h1 class="site__title"><span class="site__title-text">Time Dive</span></h1>
<div id="root"></div>

<script src="/cljs-out/dev-main.js"></script>
</body>
</html>
@@ -3,7 +3,7 @@
--color-pink: rgba(241, 50, 50, 1);
}

body {
#root {
margin: 0;
height: 100vh;
display: flex;
@@ -1,4 +1,19 @@
(ns ^:figwheel-hooks tallex.time-dive)
(ns ^:figwheel-hooks tallex.time-dive
(:require
[reagent.core :as r]))


(defn app []
[:h1.site__title
[:span.site__title-text "Time Dive"]])


(defn mount []
(r/render [app] (js/document.getElementById "root")))


(defn ^:after-load re-render []
(js/console.log "Hello, Time Dive!"))
(mount))


(defonce start-up (do (mount) true))

0 comments on commit f13ee9b

Please sign in to comment.
You can’t perform that action at this time.