Fork me on GitHub
#reagent
<
2017-06-29
>
nidu05:06:30

@pesterhazy Nope, just unsure how it all works. Usually with traditional following construction i initialized all data/events in first let and then in second let - everything that uses changing component props. Can/should i make such split using with-let?

(defn component [...]
  (let [...]
    (fn [...]
      (let [...]))))

mikerod14:06:01

anyone notice reagent with the new cljs version “1.9.660” has a warning WARNING: Protocol IFn implements method -invoke with variadic signature (&) at line 61 resources/public/js/compiled/dev/reagent/impl/util.cljs

mikerod14:06:39

newer version of reagent is out and I somehow missed it

pesterhazy14:06:25

@mikerod fortunately the warning is harmless, it should work despite the warning

pesterhazy14:06:41

still a good idea to update reagent, but not a necessity

mikerod14:06:43

Yeah, I figured

mikerod14:06:58

FYI I had a longer question related to doing the reagent upgrade that came up. So long that I just put it in the mailing list https://groups.google.com/forum/#!topic/reagent-project/Q_HaJwWVFBY

juhoteperi15:06:38

@mikerod I wrote reply there

mikerod15:06:22

@juhoteperi Thank you. That is extremely helpful and insightful!

juhoteperi15:06:26

> "closed" dependency = closer dependency, if several versions of same package are required, maven will select the one with shortest path: Dependency meditation: https://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html

mikerod15:06:13

Thanks, yeah, I’m used to the Maven dep system

mikerod15:06:24

(came from jvm, not js 😛 )

edbond16:06:47

How can I return ReactElement from function?

edbond16:06:35

Thanks everyone in the slack!

pesterhazy17:06:38

@edbond often r/as-element is more convenient

edbond13:06:24

pesterhazy: Thanks, I'll check as-element too

edbond13:06:28

Thank you! 👍:skin-tone-2:

metametadata21:06:01

What is the correct combination of deps for project.clj for the latest Reagent and React? I've tried bumping them to:

[reagent "0.7.0" :exclusions [cljsjs/react]]
[cljsjs/react "15.6.1-0"]
and get these warnings:
Warning: Accessing PropTypes via the main React package is deprecated, and will be removed in  React v16.0. Use the latest available v15.* prop-types package from npm instead. For info on usage, compatibility, migration and more, see 
Warning: Accessing createClass via the main React package is deprecated, and will be removed in React v16.0. Use a plain JavaScript class instead. If you're not yet ready to migrate, create-react-class v15.* is available on npm as a temporary, drop-in replacement. For more info see