This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-01-09
Channels
- # adventofcode (1)
- # aleph (2)
- # beginners (28)
- # boot (26)
- # boot-dev (8)
- # cider (10)
- # clara (10)
- # cljs-dev (130)
- # cljs-experience (1)
- # cljsrn (12)
- # clojure (118)
- # clojure-austin (40)
- # clojure-boston (1)
- # clojure-chicago (1)
- # clojure-dusseldorf (1)
- # clojure-estonia (11)
- # clojure-france (1)
- # clojure-greece (3)
- # clojure-italy (19)
- # clojure-nl (1)
- # clojure-russia (1)
- # clojure-spec (19)
- # clojure-uk (34)
- # clojurescript (62)
- # core-logic (7)
- # cursive (11)
- # datomic (35)
- # emacs (15)
- # fulcro (264)
- # jobs (4)
- # leiningen (5)
- # midje (4)
- # off-topic (74)
- # onyx (27)
- # planck (14)
- # protorepl (4)
- # re-frame (37)
- # reagent (62)
- # rum (2)
- # shadow-cljs (171)
- # slack-help (5)
- # spacemacs (6)
- # specter (9)
In the re-frame documentation, they stress that in “form-2” components, one must repeat any parameters in the inner function, because otherwise the render function won’t get updated props. This is confusing because in react, render functions do not get parameters. They reference props. Given that there are no props in form-2 components, I don’t even see how new “parameters” could even be provided. Does anyone know what’s going on here, or where in the source I could look?
@lee.justin.m sounds to me like you are working your way through the docs at the bottom of this page: https://github.com/Day8/re-frame/wiki#reagent-tutorials
Sounds as if you are on the first document.
I'd just keep going with the rest, despite this confusing you
I suspect that the "When do components update?" will tie it together for you
When you get there
@mikethompson thanks yea. that’s what I was looking at. I’ve puzzled through the source and some of the reagent updates and I think I get what’s going on.
In summary: when a parent component rerenders, it can supply new props to the children
So the child can get an initial set of props, and then later, when the parent rerender, new props
new prop values, that is
that makes sense to be because i am familiar with react from a JS context. what i didn’t get was that all forms of reagent components get turned into full-fledged classes. i didn’t think that was possible given that i was supplying a function but i underestimated the wizardry of reagent 🙂
its a really subtle thing because it looks like it is just a function that returns data but there is so much more crazy stuff going on
if i had one thing I could change it would be some reagent documentation that told me what it was doing instead of how to use it
@lilactown citrus is something of a re-frame clone for RUM. I'm not a fan of some of the design decisions, like their use of multimethods. But I'm nitpicking. It will get you close. https://github.com/roman01la/citrus
@lee.justin.m hopefully the rest of the docs will make it more solid for you
All seems pretty second nature to me :-)
Timothy Pratley's 4 part series will also help http://timothypratley.blogspot.com.au/2017/01/reagent-deep-dive-part-4-application.html
And so too the professional courses, if you want to pay.
Actually, after digging into re-frame, I’m actually of leaning towards reagent without re-frame (I know its weird that I asked here, but it was re-frame docs that confused me and this group seems more active). For a medium sized project, the levels of indirection in re-frame seem like a lot of firepower and a lot of cognitive load. I quite like the r/atom and r/cursor mechanism. It seems to me I can just use normal functions around the state object and let reagent take care of the rest. Maybe that’s the wrong decision. 🙂
Yeah, we get that abit.
So much so there's an FAQ to address it
@lee.justin.m I'd recommend you read https://github.com/Day8/re-frame/blob/master/docs/FAQs/DoINeedReFrame.md
If you’re curious, I basically balked at creating proxy objects in “effectful handlers” to keep things purely applicative. (as here https://github.com/Day8/re-frame/blob/master/docs/Talking-To-Servers.md#version-2) I just felt I’d spend more time debugging mini-DSLs than getting real work done
Yep, all good. Our FAQ entry is because you're not the first person :-)
@deg I was wondering how you were going with firebase?
I'm cycling back to look at it after a long absence and I'm seeing a ton of new features. Including fancy queries on the realtime database. It all looks terrific. But i was wondering what the reality was like :-)
If you have any insights, including gotchas, I'd be every interested
Hi, are there any examples to use some cljs-d3 library such as
with re-frame? I am working on a data visualization webpage (using re-frame) and searching for an example.
@cmal I did something using d3 with no library here: https://github.com/7bridges-eu/carter
I must do complex interaction with svg, listen to reagent/re-frame ratom and be reactive to user interaction and the generated state by user actions and ajax data.
well, I did only a couple of graphs to be honest, but you can see how d3 is used within re-frame and expand on that yourself 🙂
@mikethompson I'm using my Firebase stuff in one project, Trilystro. I'm pretty much happy with the way it is behaving, and am just changing the library incrementally as I need new features. I would love feedback; single-user libraries tend to accumulate problems that are only caught by more eyes.