A minimalistic ClojureScript interface to React.js
victorb 2020-05-04T11:11:12.363700Z

Anyone got any good patterns for making the repetition of the arguments for form-2 components be a bit nicer or remove it completely? Gets a bit unwieldly and error-prone when you start having a bunch of keys and other arguments. Attaching an example My first idea was to write a macro that does it for me, but as always, if there is a nicer way of doing than macros, I'd be happy!

victorb 2020-05-05T07:13:43.369900Z

yeah, noticed bunch of stuff that is not captured in other places than the changelog (and possibly third party sources), so saving reading through the entire changelog for a rainy day, seems there is more stuff I've (and possibly others) have missed!

p-himik 2020-05-05T07:18:32.370300Z

@victorbjelkholm429 Many of such things have been mentioned here:

victorb 2020-05-05T07:20:16.370500Z

yeah, I've been following the changelog (and the news) but missed going back further, like to posts from 2015, thinking it was already written somewhere else. But thanks for linking that one as well!

kenny 2020-05-05T15:26:16.375900Z

Wow, I had never seen that. Been using Reagent for many years. This is super cool though. Excited to move many of our components over to it.

p-himik 2020-05-04T11:14:54.364Z

There's no need to specify all the arguments. Just use what you really use. In your example, it can be as simple as (defn text-input [_] ...).

victorb 2020-05-04T14:49:35.364700Z

> There's no need to specify all the arguments Yeah, I did that when I started out but always ends up in a situation when I forgot adding something to the second function and then take some time to figure it out...

victorb 2020-05-04T14:50:06.364900Z

@juhoteperi ah, that's exactly what I'm looking for, thanks a lot!

kenny 2020-05-04T21:30:40.365600Z

Woah, I didn't know that existed. That is so useful!! So any form-2 component that just initializes ratoms can be written as a form-1 with r/with-let?