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 simple-modular-ring.core | |
(require | |
[ring.adapter.jetty :refer [run-jetty]] | |
[simple-modular-ring.handler :as h] | |
[simple-modular-ring.middleware :as m] | |
)) | |
(def app | |
(-> h/post-form | |
m/logger |
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 ring-with-routing.core | |
(require | |
[ring.adapter.jetty :refer [run-jetty]] | |
[ring-with-routing.handler :as h] | |
[ring-with-routing.middleware :as m] | |
)) | |
(def app | |
(-> h/handler-with-routing | |
m/logger |
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 simple-compojure.core | |
(require | |
[ring.adapter.jetty :refer [run-jetty]] | |
[ring.middleware.params :as p] | |
[simple-compojure.middleware :as m] | |
[simple-compojure.routes :as r] | |
)) | |
(def app | |
(-> r/routes |
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 simple-hiccup.core | |
(require | |
[ring.adapter.jetty :refer [run-jetty]] | |
[simple-hiccup.middleware :as m] | |
[simple-hiccup.routes :as r] | |
)) | |
(def app | |
(-> r/routes | |
m/logger |
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-cljsbuild.core) | |
(js/alert "Hello ClojureScript!") |
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 try-cljsbuild.core) | |
(js/alert "Hello Clojurescript!") |
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-figwheel.core) | |
(js/alert "Hello ClojureScript!") |
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 |
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 react-tutorial.core | |
(:require | |
[reagent.core :as r])) | |
(defn Square [] | |
[:button.square]) | |
(defn Board [] | |
(let [renderSquare (fn [i] [Square]) | |
status (r/atom "Next player: X")] |
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 clicker.core | |
(:require [reagent.core :as r])) | |
(defn clicker [] | |
(let [john? (r/atom true)] | |
(fn [] | |
(let [clicks (r/atom 0)] | |
(fn [] | |
[:div | |
[:h1 {:on-click #(swap! john? not)} (if @john? "John" "James")] |