This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-08-02
Channels
- # admin-announcements (3)
- # architecture (5)
- # beginners (10)
- # boot (223)
- # cider (13)
- # cljsjs (2)
- # cljsrn (50)
- # clojure (208)
- # clojure-austin (16)
- # clojure-belgium (1)
- # clojure-india (1)
- # clojure-poland (13)
- # clojure-russia (130)
- # clojure-spec (27)
- # clojure-uk (144)
- # clojurescript (135)
- # css (2)
- # cursive (10)
- # datavis (1)
- # datomic (29)
- # dirac (9)
- # funcool (2)
- # hoplon (41)
- # jobs (3)
- # leiningen (6)
- # om (37)
- # onyx (20)
- # pedestal (1)
- # planck (1)
- # proton (4)
- # re-frame (45)
- # reagent (17)
- # rethinkdb (16)
- # ring-swagger (19)
- # schema (5)
- # specter (93)
- # sql (16)
- # test-check (33)
- # untangled (7)
@gadfly361 @hjrnunes: Having similarly structured EDN maps with different language entries and subscribing to the keys in the app-state, and, in one place setting the language by loading a that specific language's map into app-state, is also how I envisioned simple, homebrewed i18n in Clojure. I'm looking forward to actually implementing it in a Reagent app and watching the app react to me switching the language back and forth 🙂 For larger apps with a lot of entries, I guess you could do like I'm used to in Java and make 'sub-keys' for each subsection of the app, e.g. frontpage.title
, profile.title
etc
@tonsky just released an i18n approach too: https://github.com/tonsky/tongue
How do you attach/read/change metadata on an ratom? I see this in the source:
(defn atom
"Like clojure.core/atom, except that it keeps track of derefs."
([x] (RAtom. x nil nil nil))
([x & {:keys [meta validator]}] (RAtom. x meta validator nil)))
which makes me think that you can pass a map with a meta key. But when I try and retrieve the metadata I get nil.
(meta (reagent.core/atom nil {:meta {:loading true}})) ;; returns nil
@seantempesta: that would be (atom nil :meta {:loading true})
note the ampersand in the arg vector
Hey, wondering if there is anyway offhand to get the hiccup for a reagent component?