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!
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! https://github.com/reagent-project/reagent/blob/master/CHANGELOG.md
@victorbjelkholm429 Many of such things have been mentioned here: https://reagent-project.github.io/news/news060-alpha.html
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!
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.
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 [_] ...).
> 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...
@juhoteperi ah, that's exactly what I'm looking for, thanks a lot!
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