Fork me on GitHub

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)?


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


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.


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.


@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.


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


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


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


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? 😉


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


hi, can someone tell me why is this mostly empty? especially such an often used function?


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.


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


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.


@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)


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


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


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.


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"


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


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.


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


@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. 🙂


May I respectfully disagree?


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


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


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


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


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


like use different tech or write issues


@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 :)


can't disagree with anything you said 😄


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


btw, i am firmly against beginners opening issues


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


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


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


sure, that's not something i question


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


you respond differently


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.


@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 🙂


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.


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


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.


@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