Fork me on GitHub
#reagent
<
2017-06-27
>
kommen08:06:58

anybody else running into the problem with clojurescript 1.9.655 and reagent? https://github.com/reagent-project/reagent/issues/293

pesterhazy08:06:22

@kommen , I'd bring it up in #cljs-dev , ideally along with a minimal example using only the ClojureScript jar (no lein)

kommen08:06:40

wasn’t sure if it is a cljs or a reagent issue

pesterhazy08:06:52

I'm not sure either

miikka09:06:31

Is it okay to swap! a ratom inside :component-will-update?

juhoteperi12:06:58

I'm planning on releasing 0.7.0 with partial-ifn fix (https://github.com/reagent-project/reagent/pull/303) & few other small changes

juhoteperi12:06:32

The fix could be released as 0.6.3 but I have already merged some potentially breaking changes (removed some deprecated macros) so I think incrementing the version number is good idea

juhoteperi12:06:13

I could also create 0.6 branch and backport the partial-ifn fix there but I guess everyone can as well just update to 0.7.0

pesterhazy13:06:10

one problem I see is that it requires a newer version of react

pesterhazy13:06:42

because of the create-react-class dependency

pesterhazy13:06:58

in other words, it wouldn't be a drop in replacement for 0.6.2

juhoteperi14:06:40

That's why the version number is 0.7.0

juhoteperi14:06:07

Perhaps there won't be this great hurry for new release, lets see if Cljs will get the fix

pesterhazy14:06:32

that'd be much better, then we can fix it at our own pace

pesterhazy14:06:39

FWIW, your snapshot release fixes @kommen's test case: https://github.com/pesterhazy/reagent-655

pesterhazy14:06:37

I've tried to reproduce the issue with r/wrap but couldn't. So does this only happen when you use r/partial manually?

juhoteperi14:06:10

@pesterhazy Did you try using reset! with the wrap value? That should call invoke on the callback which is created with partial-ifn

pesterhazy14:06:06

like this

(let [a (r/wrap 15 swap! my-atom assoc :foo)]
  (reset! a 20)
  (prn [:a @a]))

pesterhazy14:06:14

seemed to work fine

felipe-campos15:06:57

n00bie question: I want to try this React component (https://github.com/zenoamaro/react-quill). How would I plug this into Reagent? BTW: yes, I’m aware of the markdown-editor recipe in the Reagent Cookbook.

kommen15:06:34

@pesterhazy @juhoteperi fwiw, as I wrote in #cljs-dev, with cljs 1.9.660 reagent 0.6.2 keeps working and just prints a warning

juhoteperi15:06:48

Yeah, tested it myself also

juhoteperi15:06:11

I updated the changelog already to say the new version fixes the warning

kommen15:06:32

cool, thanks!

yogthos15:06:59

@juhoteperi would it make sense to push out a release?

juhoteperi16:06:45

Yes, I'll do that now

yogthos16:06:16

awesome, I can pushout luminus/reagent templates 🙂

pesterhazy16:06:01

> Reagent has now dependency on cljsjs/create-react-class, if you are using other methods to provide React, you need to exclude this Cljsjs dependency and provide the library yourself.

pesterhazy16:06:10

do you also need to provide a mock namespace?

pesterhazy16:06:29

.o0(if only there were surrogate packages)

pesterhazy16:06:07

maybe it would be worth pointing out the mock namespaces in the changelog?

juhoteperi16:06:52

Readme should probably be updated, it now mentions just mock cljsjs.react ns but it should also mention react.dom and create-react-class

pesterhazy16:06:48

another thing, which React version is the minimum necessary for reagent 0.7.0? 15.5.0?

pesterhazy16:06:09

I'd be happy to do a PR with those changes

juhoteperi16:06:16

Versioning for create-react-class at least starts from 15.5.0, not sure if that will work with older React + React-dom

pesterhazy16:06:22

I think 15.5.0 as a minimum is a good guess

pesterhazy17:06:16

Thanks @juhoteperi for your great work on Reagent by the way and congrats for the 0.7.0 release

juhoteperi17:06:44

@pesterhazy Thanks, I have mostly been fixing bugs we'd hit at work anyway, still plenty of open bugs and PRs that I haven't had time to look at

ajs18:06:49

any recommendations for ui frameworks that play well with reagent? there is a bootstrap wrapper i see, how about foundation or others?

miikka19:06:06

Well, I guess it's not ui framework in the same way as Bootstrap or Foundation. Anyways.

ajs19:06:31

looks intresting, thanks. i shall take a look at it.

ajs19:06:50

it seems to do many of the same things are bootstrap

ajs19:06:17

i'm a bit new to 3rd party front end ui frameworks ,i've always rolled my own css, etc but i don't have the time for that now, so trying to swim through all the options

ajs19:06:52

it's been hard to understand exactly what kind of stuff is hidden inside these frameworks that might or might not conflict with reagent

miikka19:06:39

There's usually lots of information about what works with React and what doesn't. As a rule of thumb, if it works with React, it will work with Reagent.

ajs19:06:11

i assume there might be a bit of using the react adapt-class tools in reagent for some of these with react bridges already

miikka19:06:55

You're right. For example, if you look at cljs-react-material-ui's Reagent support: https://github.com/madvas/cljs-react-material-ui/blob/master/src/cljs_react_material_ui/reagent.cljs

gadfly36119:06:46

Have used cljs-react-material-ui in production, works great. +1

ajs19:06:27

good to know