Fork me on GitHub
Eva O00:01:02

With the introduction of these RAD hooks, do you recommend new projects lean towards using hooks over class lifecycle methods?


In general the hooks approach does seem to be cleaner. I don’t generally use the old component lifecycle methods in new code myself…but YMMV. As far as I can tell React will continue to support both far into the future.


The hooks stuff makes disconnected subtrees way easier in Fulcro. I added a defnc (normalizing component) to raw. This takes you one step closer to easy standalone react code that uses a Fulcro subtree with full-stack support, but doesn’t have any opinion at all what you use for actual rendering (other than it is react-based).


I mean, you can do non-react as well, but that requires you hook up some kind of mock rendering system to update your “UI” every time Fulcro wants a refresh.

Eva O07:01:13

Ok thanks. I'll start using hooks.


The downside of hooks is shouldComponentUpdate, but latest FUlcro adds wrapper for React memo

Eva O07:01:04

Why doesn't date-time/*current-timezone* default to the system default? It seems weird to need to call (dt/set-timezone! (str (zone-id/system-default)))


Because a server runs in an arbitrary env where that might not be correct. Assumptions on the part of the library in this case are bad. It might be ok to do so in client code, but it is trivial for you to set it correctly via your own code and decision logic.


Also, on a server, you might have users in many zones, so with-timezone is more appropriate.

Quentin Le Guennec21:01:48

Is the fulcro-rad-template expected to work behind a load balancer with multiple instances of the fulcro app? I’m guessing there will be issues with csrf and ring sessions.

Jakub Holý (HolyJak)21:01:31

That sounds about right. You would need to impl some shared session and csfr storage.