This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2015-07-13
Channels
- # admin-announcements (296)
- # beginners (19)
- # boot (40)
- # cider (77)
- # clojure (139)
- # clojure-australia (2)
- # clojure-bangladesh (6)
- # clojure-dev (19)
- # clojure-japan (25)
- # clojure-russia (23)
- # clojure-sg (1)
- # clojure-uk (4)
- # clojurescript (131)
- # datomic (41)
- # editors (42)
- # ldnclj (35)
- # off-topic (11)
- # reagent (10)
a recent talk on clojurescript + react (reagent): video: http://domcode.org/videos/2015/05/26/clojurescript-and-reactjs/ slides: https://github.com/borkdude/domcode-cljs-react
I'd like to make a reusable focused
function that calls .focus on a component's root element. So I made this:
(defn focused [comp]
(with-meta comp
{:component-did-mount #(.focus (dom-node %))}))
which I think should be usable as [(focused text-input) model]
, where text-input is an [:input {:type "text" :value @model :on-change #(reset! model (e->value %)}
. However, I'm having trouble passing in the model argument to the wrapped component.
Any ideas how to do this?Found a solution: http://stackoverflow.com/questions/27602592/reagent-component-did-mount
I often see error messages from util.cljs, coming from inside render-component. Is there a way to see more specifically where those errors come from?
Added [re-com "0.5.4"]
dependency and getting this error: clojure.lang.Compiler$CompilerException: java.lang.IllegalArgumentException: No single method: _setup of interface: cljs.repl.IJavaScriptEnv found for function: -setup of protocol: IJavaScriptEnv, compiling:(cemerick/piggieback.clj:149:5)
. I have [org.clojure/clojurescript "0.0-3308" :scope "provided"]
set and boot is using Clojure 1.7 to build.
@petrus: I saw someone having an issue with re-com and boot because the clj-time used by re-com was out of date, or something. Only a vague memory.