Fork me on GitHub
#reagent
<
2018-11-09
>
lilactown00:11:21

I usually use (.. % -target -value) - don't know if there's any meaningful difference

enforser00:11:44

user=> (macroexpand '(.. % -target -value))
(. (. % -target) -value)
user=> (macroexpand '(-> % .-target .-value))
(. (.-target %) -value)
That is the difference when all is said and done!

athomasoriginal02:11:42

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

folcon10:11:06

Any good resources that anyone can point me to that breaks down improving performance in reagent?

keymone11:11:15

trying to run an uberjar and getting this error: java.lang.NoClassDefFoundError: clojure/lang/Var

keymone11:11:56

i have org.clojure/clojure in dependencies and am running -SNAPSHOT.jar file so i don’t think i need any additional classpaths

keymone11:11:18

asking here because i just made a reagent app from lein template yesterday

keymone11:11:40

oops, /me being dumb, the versioned file is the one that doesn’t bundle everything /facepalm

4
kenny18:11:24

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?

mikethompson22:11:52

@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

kenny22:11:32

@mikethompson Yikes. It almost seems like real solution would be to have native support for React's async rendering.

mikethompson22:11:54

I'm not sure I follow how that helps. But, sorry, I have to go out now (Saturday morning here).