This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-07-20
Channels
- # aleph (4)
- # beginners (47)
- # boot (22)
- # cider (7)
- # clara (1)
- # cljs-dev (8)
- # cljsrn (21)
- # clojure (180)
- # clojure-argentina (13)
- # clojure-gamedev (1)
- # clojure-italy (5)
- # clojure-poland (4)
- # clojure-russia (17)
- # clojure-spec (19)
- # clojure-uk (33)
- # clojurescript (107)
- # cursive (61)
- # data-science (1)
- # datomic (7)
- # emacs (69)
- # euroclojure (1)
- # graphql (1)
- # hoplon (11)
- # immutant (43)
- # jobs (1)
- # leiningen (3)
- # off-topic (5)
- # om (10)
- # onyx (2)
- # parinfer (52)
- # pedestal (11)
- # re-frame (31)
- # reagent (23)
- # ring-swagger (3)
- # schema (2)
- # specter (7)
- # unrepl (9)
can anyone suggest a nice hoplon integration (maybe a boot task) for a browser repl ?
@avabinary how did you go?
the chain is this global app-state for admin ns --> lens selecting a single key which has a vector of maps --> passed that lens to defelem-ed function in a case-tpl --> lost the iSequability
admin.clj file 1/2:
(ns admin.dashview (:require [admin.edit-users :refer [user-edit-view]]))
(defc app-state {:modules {}
:choices {:top nil :bottom nil}}
:users-to-edit {})
(defn path-cell [c path]
(cell= (get-in c path)
(partial swap! c assoc-in path)))
(def all-users-cell (path-cell app-state [:users-to-edit]))
(defn get-all-users []
(ajax-request {:uri "/api/users/"
:method :get
:handler (fn [[ok response]]
(if ok (dosync
(reset! all-users-cell response))
(.error js/console (str response))))
:format (json-request-format)
:response-format (json-response-format {:keywords? true})}))
(case-tpl route
:users (div "users")
:edit-users (user-edit-view :users all-users-cell))
second file edit_users.clj 2/2
(ns admin.edit-users)
(defelem user-edit-view [{:keys [users]} _]
(for-tpl [n (cell= users)]
(div (cell= (:user_id n)))))