Created
November 10, 2016 22:26
-
-
Save zehnpaard/6aa2956b1509335e34a5cf35b88d1dc2 to your computer and use it in GitHub Desktop.
Minimal Reagent Project
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns min-reagent.core | |
(:require | |
[reagent.core :as r])) | |
(defn my-app [] | |
[:div | |
[:h1 "Hello Reagent"] | |
[:p "ClojureScript + React + Atoms + Hiccup"]]) | |
(r/render | |
[my-app] | |
(js/document.getElementById "appdiv")) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
. | |
├── project.clj | |
├── resources | |
│ └── public | |
│ └── index.html | |
└── src | |
└── min_reagent | |
└── core.cljs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<body> | |
<div id="appdiv"></div> | |
<script src="js/out/goog/base.js"></script> | |
<script src="js/main.js"></script> | |
<script>goog.require('min_reagent.core')</script> | |
</body> | |
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defproject min-reagent "0.0.1" | |
:dependencies [[org.clojure/clojure "1.8.0"] | |
[org.clojure/clojurescript "1.9.293"] | |
[reagent "0.6.0"]] | |
:plugins [[lein-cljsbuild "1.1.4"] | |
[lein-figwheel "0.5.7"]] | |
:cljsbuild | |
{:builds | |
{:dev {:source-paths ["src"] | |
:figwheel true | |
:compiler {:output-to "resources/public/js/main.js" | |
:output-dir "resources/public/js/out/"}}}}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment