A minimalistic ClojureScript interface to React.js

The new :f> seems great!


I wonder how it will interact with re-frame.

juhoteperi 2020-05-07T05:37:34.388600Z

@neo2551 Shouldn't affect re-frame use in any way. Ratoms work the same in function components.


Yeah, the question should perhaps be more "how will the use of React Hooks interact with re-frame"


Because Hooks offers a different "state management" model

juhoteperi 2020-05-07T05:39:27.390800Z

Yeah. But my view is still that ratoms are already more useful, they can be used outside render call etc.


Yes, I absolutely agree


I was just suggesting the that issues would be elsewhere


Ie. :f> will work fine with re-frame. But the Hooks within them might not

juhoteperi 2020-05-07T05:41:13.394Z

But hooks could be useful as implementation for some things. Like useRef could be used to initialize ratoms/subscription once (like subscription deref already works).


Yep, I'm probably thinking more of useState etc


Is that the name?

juhoteperi 2020-05-07T05:42:35.395600Z

With useRef you can create mutable object, per component instance, where changes don't automatically trigger re-render.


I'm going to look that up now


I'm trying to get up the Hooks learning curve

juhoteperi 2020-05-07T05:44:27.397500Z

Just learned about that use for useRef yesterday myself, @roman01la recommended it for function component implementation instead of useState where I just had one value I didn't update:


@mikethompson thanks for clarifying my thoughts. It is exactly what I was thinking, hooks provide an additional way of managing state and I wondered whether/how we will manage it with re-frame or otherwise


I strongly suspect that Hooks managing state won't work well with re-frame managing state


I'm trying to like Hooks, i really am :-) But I don't like my views doing anything other than rendering

juhoteperi 2020-05-07T05:52:15.403800Z

useState could be used for local state, similar to local atom for some parts, probably doesn't make sense to use them for application state. And for interop etc.


I haven't tested it yet: but can we useState with a CLJS value?

lilactown 2020-05-07T14:38:33.418900Z

You can place any value inside of a useState or useRef, no need to convert anything


Or will it get round-tripped via clj->js

juhoteperi 2020-05-07T05:55:07.406700Z

Should work. I think hx and other wrappers use cljs values with state hooks directly.


@juhoteperi BTW, I'm currently putting together a grownups website for re-frame. When we have it all figured out, maybe we do something similar for Reagent

juhoteperi 2020-05-07T06:07:39.409100Z

Yeah I've been thinking about building a new website, and pretty much rewriting all the docs also.


I thought all your docs were really good for both projects.

juhoteperi 2020-05-07T06:38:23.411200Z

I think Reagent docs at least has good parts, but some of the older pages could be reordered a bit and they are missing some stuff and adding them requires modifying the existing parts.


@neo2551 It is not the contents of the docs that's an issue. Its the presentation.


I wrote a small library for myself that extends marginalia for leveraging mkdocs-material (


I think also use it. I found it was nice enough with the search function as well.


@neo2551 yeah, we're going with mkdocs


Shared from shadow-cljs channel … perhaps it’s more a reagent topic.

lilactown 2020-05-07T14:38:33.418900Z

You can place any value inside of a useState or useRef, no need to convert anything