Fork me on GitHub

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:


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.


@lee.justin.m hopefully the rest of the docs will make it more solid for you


All seems pretty second nature to me :-)


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


thanks for the link, I’ll check it out


Yeah, we get that abit.


So much so there's an FAQ to address it


If you’re curious, I basically balked at creating proxy objects in “effectful handlers” to keep things purely applicative. (as here 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:


Thanks @manuel


no problem, have a look at graphs.cljs in particular


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 🙂


Ahh, saw the code. Thank you!


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