This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-11-09
Channels
- # aleph (3)
- # beginners (327)
- # calva (3)
- # cider (20)
- # cljdoc (59)
- # cljs-dev (40)
- # clojure (104)
- # clojure-dev (30)
- # clojure-italy (8)
- # clojure-nl (36)
- # clojure-russia (3)
- # clojure-spec (3)
- # clojure-uk (79)
- # clojurescript (54)
- # community-development (5)
- # cursive (28)
- # data-science (21)
- # datomic (35)
- # emacs (14)
- # expound (1)
- # figwheel (2)
- # figwheel-main (82)
- # fulcro (18)
- # graphql (13)
- # jobs (12)
- # jobs-discuss (38)
- # kaocha (8)
- # lambdaisland (1)
- # lumo (12)
- # off-topic (20)
- # onyx (4)
- # re-frame (51)
- # reagent (12)
- # reitit (8)
- # ring-swagger (1)
- # shadow-cljs (22)
- # slack-help (2)
- # spacemacs (6)
- # specter (16)
- # testing (3)
I usually use (.. % -target -value)
- don't know if there's any meaningful difference
user=> (macroexpand '(.. % -target -value))
(. (. % -target) -value)
user=> (macroexpand '(-> % .-target .-value))
(. (.-target %) -value)
That is the difference when all is said and done!I have a project which has React
in node_modules
. I also have my reagent project at the same level. TMK this means that reagent will look into node_modules
and use its version of react. Is there a way to tell reagent to only use the cljsjs deps (the version of react deps it comes with) and ignore the node_modules
version?
I should clarify that I am using figwheel.main and webpack to create externs so :npm-deps
is set to false
Any good resources that anyone can point me to that breaks down improving performance in reagent?
trying to run an uberjar and getting this error: java.lang.NoClassDefFoundError: clojure/lang/Var
i have org.clojure/clojure in dependencies and am running -SNAPSHOT.jar file so i don’t think i need any additional classpaths
oops, /me being dumb, the versioned file is the one that doesn’t bundle everything /facepalm
I have an :input
with :type "email"
. If there is some text in the input and I manually move the cursor to somewhere that is not at the end of the input and type a letter, the cursor will jump to the end of the input. If I change the :input
to :type "text"
, the problem does not occur. Has anyone encountered this and come up with a fix/workaround?
@kenny
Short answer is ... I suspect this is a reagent limitation
Longer answer is ...
Notice that email
is not in this list
https://github.com/reagent-project/reagent/blob/4c369531ce2a61cb133a242124617a159a39d9b4/src/reagent/impl/template.cljs#L157-L158
And that's because in the standard email
inputs don't support selectionStart
and selectionEnd
See https://html.spec.whatwg.org/multipage/input.html#do-not-apply (is this still current??)
For all the details, and plenty of discussion about email
and number
...
https://github.com/reagent-project/reagent/pull/126
@mikethompson Yikes. It almost seems like real solution would be to have native support for React's async rendering.
I'm not sure I follow how that helps. But, sorry, I have to go out now (Saturday morning here).