Fork me on GitHub
#reagent
<
2016-12-06
>
ryancole02:12:46

hi, folks. i'm sure this is asked a ton, so please forgive if it was asked recently. i did scroll up through history a bit and didn't see it. i'm coming from plain js, where i am using graphql and relay, with react. is there a relay comparable for reagent (or just react in general, in clojurescript)?

ryancole02:12:19

i've got a whole graphql backend. wondering if i can use that to some degree.

curtosis03:12:32

anyone successfully mixed reagent-forms and devcards? I though I had them both understood but the combination just throws "Uncaught Error: No protocol method IDeref.-deref defined for type undefined: “ and I don’t know the internals well enough to grok the stack trace.

danielgrosse09:12:29

How can I use the last git version of reagent in my project, to test if it breaks something? The snapshot repository on clojars isn't the latest.

metametadata09:12:20

@danielgrosse try building reagent on your machine, then do lein install. This way the latest snapshot version of reagent will be put into your local Maven folder and will be available for other projects.

val_waeselynck11:12:24

@ryancole check out Om Next for a closest thing to GraphQL / Relay implemented in ClojureScript-land

val_waeselynck11:12:54

I don't exactly know how compatible to Reagent that is

val_waeselynck11:12:23

Otherwise I guess you'll probably need to write a GraphQL / Relay adapter

curtosis14:12:10

Back to my earlier reagent-forms question today… it looks like what I want to happen conceptually is to click a button, add a row of fields to the form template, and have bind-fields do the right thing(tm). How likely is that to work? 😉

curtosis14:12:31

I haven’t found any examples yet of dynamically-updated templates out there, so curious if anyone’s doing it.

Aron14:12:53

hi, can someone tell me why is this mostly empty? http://blog.ducky.io/reagent-docs/0.6.0-alpha2/reagent.core.html#var-render-component especially such an often used function?

curtosis15:12:46

here’s what I’ve got sketched out; I’ve got something reagent/react-ish not bound correctly and the form isn’t updating yet. https://gist.github.com/curtosis/a4c47dae45a81030d011cce550cb0e4a

curtosis15:12:10

that is, make-user-form-template only gets called on component creation. So somehow I need to hook into component-did-update, perhaps?

curtosis15:12:12

my make-user-form-template dereferences the app-state ratom, so it seems like a change to app-state should trigger a re-render, and a re-call of bind-fields.

wasser16:12:03

@ashnur: if I'm reading the source right, (render-component) is just an alias for (render) which itself is just a wrapper for (dom/render) https://github.com/reagent-project/reagent/blob/master/src/reagent/core.cljs

Aron16:12:18

so everything that's empty is an alias for render?

Aron16:12:43

i can read the source too, what i can't read is the documentation.

mitchelkuijpers16:12:22

render-component is only there for backwards compatibility @ashnur. And you are welcome to fix that docstring, I think the maintainers of reagent would be happy with a pull-request.

Aron16:12:48

i am not sure that they would like my pull request given how i am supposed to be a beginner here who is asking for help and going to the docs to read about functions not to find empty pages and when asks about the empty pages not to be told that "you should totally do it"

Aron16:12:20

next time you will tell me that beginners should design the api too, maybe the maintainers will be happy with that too

curtosis16:12:47

hmmm… Now I’m even more confused. It looks like my make-user-form-template function is getting called on every update, but bind-fields isn’t rebuilding the form.

curtosis16:12:36

so there’s something I’m clearly really not getting about bind-fields. Ugh.

shaun-mahood17:12:17

@ashnur: You could also file an issue with your concerns - there have been discussions in the past about improving the documentation in Reagent so it may help in that effort. It's an unfortunate reality that on open source projects it is tough to find people who want to spend their free time improving documentation, including docstrings. I'm trying to start improving documentation in projects that I care about, especially as a beginner, because once you start to really understand the code it gets harder and harder to see the problems that beginners will run in to. I've found it a lot more productive and positive than just complaining that other people aren't doing the unpaid work that I want them to, and it's helped me to better understand the code as well. That might not be the answer you want though. 🙂

Aron18:12:48

May I respectfully disagree?

Aron18:12:21

This statement that Open Source is somehow hard to find people who spend time improving documentation is the problem is something that I think is completely wrong

Aron18:12:03

Sure, when you can pay (which is or isn't the case for open source, the two are completely independent) you get more people to work on

Aron18:12:16

at least i am not aware of a single project ever which was first built and then the documentation made for it later and it was good

Aron18:12:03

you are right that complaining is not good, but you see, i have this terrible experience with the clojure environment that as long as i am an outsider, everybody is nice and kind and you all answer even irrelevant questions just because you can

Aron18:12:26

but when i try to do anything related to clojure i am either ignored, or told to do something else than what i am trying to do

Aron18:12:33

like use different tech or write issues

gadfly36118:12:05

@ashnur thank you for your concerns. I think what we should do is file an issue to strip render-component from the README and home page of the website and replace with render. Promoting an old api is the root cause of this specific confusion. While this doesnt address the greater problem of poor documentation and communication, i think it is an actionable item it the right direction :)

Aron18:12:02

can't disagree with anything you said 😄

gadfly36118:12:10

Awesome, i will go ahead and file an issue then!

Aron18:12:36

btw, i am firmly against beginners opening issues

Aron19:12:08

i think people usually just say it because then they have an interface to interact with a problem so it probably seems like they have more control

jjfine19:12:10

i disagree based on @shaun-mahood 's previous point that sometimes a beginner will see things that an experienced dev won't, especially when it comes to documentation

jjfine19:12:34

even at my work, we usually get the best documentation pull requests from when a new dev joins the team

Aron19:12:21

sure, that's not something i question

Aron19:12:08

but i would treat insider input differently from outsider. not necessarily separated completely without any interaction, but it's good to know if the person raising the issue is someone experienced in the context or not

Aron19:12:15

you respond differently

gadfly36119:12:11

I think both viewpoints make a lot sense, but ultimately i think we need to foster an environment where everyone is comfortable, especially those who self-identify as beginners. So while i agree beginners should file issues, they can be made timid when we often say 'ask that in slack' to many of their questions .. so it can be hard to discern, as a beginner, if it is ok to make an issue about something.

shaun-mahood19:12:16

@jjfine: I think my statement might have been badly worded - I was thinking of beginner and experienced in terms of the specific library, not Clojure or development in general. So your second statement above fits what I meant to say very well 🙂

shaun-mahood19:12:52

Also, I think it’s a really good point that we sometimes bounce people back and forth between “ask in Slack” and “file an issue”, which is definitely not a good plan.

shaun-mahood19:12:49

I find beginners to the language or development in general expose the assumptions I didn’t realize I was making, but it’s pretty unfair to assume that they will then file an issue - sorry about that @ashnur

Aron19:12:53

i think the same reason there is a #beginners channel, support should not be part of issues. I don't want to make this about semantics, so I realize the way I understand the word issue might not be how other people understand it.

Aron19:12:48

@shaun-mahood no need to be sorry 🙂, i was way too nervous to talk to people, i should've calmed down first and then write