Fork me on GitHub
#reagent
<
2016-02-02
>
amrit19:02:18

Hi... just started having a look at reagent... what would be the flux equivalent of reagent in clojure, or is there no need?

gadfly36119:02:06

@amrit these are not flux, but they are relevant to the intent of your question: 1) https://github.com/Day8/re-frame 2) https://github.com/krisajenkins/petrol

amrit19:02:45

hmm thanks @gadfly361 @donmullen . I am new to clojure and react both and was wondering if i should choose to build the frontend of my app (backend is in rails) in clojurescript using reagent or in reactjs?

jaen19:02:23

@amrit: Clojurescript will probably be nicer to work with than Javascript, at least ES5; ES6 is better, though still not a nice IMO.

jaen19:02:37

The one thing that might be vexing when choosing Clojurescript though is consuming REST APIs.

jaen19:02:01

At least it was to me at first until I figured how to properly use schema coercions and implemented two-way coercions.

gadfly36119:02:39

@jaen do you have any links for documentation or examples concering consuming REST APIs? I have had pain with that too

donmullen19:02:19

@amrit if you opt for es6 + react - you might consider https://github.com/shakacode/react_on_rails

amrit19:02:18

@donmullen: rails gitter just told me it would be better to sepeate out frontend and backend rails api...to simplify life

amrit19:02:53

who is using reagent in production extensively?

jaen19:02:03

@gadfly361: you can look through this code here - https://github.com/jaen/panda-5/tree/master/src/panda_5/api - it's Clojure, but for Clojurescript it's analogous. I also have some older code here - https://github.com/jaen/projekt-bd-frontend/tree/master/src/cljs/medisoft/frontend/api - but the coercion part is not as nice as in that newer repo (but on the flipside it's Clojurescript).

jaen19:02:06

Hope it helps somehow.

jaen19:02:38

@amrit: reagent project has this list, but I guess there's more than that - https://github.com/reagent-project/reagent/wiki/Applications-built-with-Reagent

jaen19:02:29

@gadfly361: also this might be of interest for you https://github.com/gfredericks/schema-bijections; didn't need to try it though, the code from the first repo I linked worked well enough for my use case.

amrit19:02:38

could there be any disadvantage using reagent instead of reactjs directly

gadfly36119:02:56

@amrit hiring pool is much smaller

gadfly36119:02:13

though better 😉

amrit19:02:23

@gadfly361: simple_smile I meant technically... hitting any major roadblocks etc

jaen19:02:01

The lack of answer is sort of an answer; I don't think you're bound to hit anything like that.

jaen19:02:09

You can use React components in reagent no problem

jaen19:02:17

You can use reagent in React Native

gadfly36119:02:26

@amrit using external js libs sometimes is a pain point (especially if they arent on cljsjs)

jaen19:02:56

Right, but that's Clojurescript-specific instead of reagent-specific

jaen19:02:02

But it's certainly a thing to have in mind

jaen19:02:14

Using CommonJS-based libraries can be a pain - you have to use webpack/browserify/something to compile the modules out and use the resulting file as a foreign lib.

jaen19:02:27

Clojurescript can't really deal with non-GClosure modules.

richiardiandrea23:02:58

Hello guys, can I use reagent 0.6.0-alpha with re-frame 0.7.0-alpha-2?

yenda23:02:43

i'm using it with 0.7.0-alpha so I guess 2 is ok too

richiardiandrea23:02:15

I have a can't find reagent_init... bla bla that is why I am asking 😄

yenda23:02:18

what do you take 0.7.9-alpha-2 it's not on master

yenda23:02:33

you cloned it from the dev branch ?

yenda23:02:38

just take alpha it works fine

yenda23:02:19

but you might get the same error actually

yenda23:02:37

because I don't see anything in the commits that would trigger that

yenda23:02:07

I'm gonna try it on a working project

yenda23:02:36

@richiardiandrea: the match is working for me, this is certainly not the cause

richiardiandrea23:02:50

I forgot to execute start-repl for the Clojurescript repl

richiardiandrea23:02:58

thanks and sorry for wasting your time