Fork me on GitHub

I’ve been using reagent for about 4+ years now, but today is the first day I used cursors 😉


what does this mean about rswap! ? allows recursive applications of rswap! on the same atom


I still refer to these old release notes to answer questions like that from time to time: - look for "Event handling with rswap!", there's some detail in that section


The relevant bit, I think: >This simple application could probably just as well use the common swap! instead of rswap!, but using swap! in React’s event handlers may trigger warnings due to unexpected return values, and may cause severe headaches if an event handler called by emit itself emits a new event (that would result in lost events, and much confusion). > >For a more structured version of a similar approach, see the excellent re-frame framework.