In order for re-frame to be used together in conjunction with React 19 (the typical problematic case being a controlled input backed by rf/dispatch + rf/subscribe), it needs to stop queueing the events. Is it something that will happen in the future or not?
Yeah I don't recommend the reagent-next branch, the demo site shows it is quite broken.
It has been an issue for every version of React as far as I know, just more or less apparent in different circumstances.
The fix has always been to use dispatch-sync for any actions that require an immediate effect.
But is Reagent compatible with React 19 at all? Luis asked above, and after a quick check I figured that it's not the case.
The last release of Reagent is not compatible with React 19, but there is a branch reagent-next where it tries to, where batching is disabled and the :input hack is no longer required / working.
@luis.cerritosor In case it's still relevant.
I also have an experimental project which is "kind-of-compatible" with the Reagent API, which is compatible with React 19.
Thank you @p-himik I will try that reagent-next 😄
In the future, we can't assume that Reagent has batching and that it should work with the :input hack. https://github.com/pitch-io/uix/issues/204, for info
I've just been trying to update to React 18. Do you think it's worth trying reagent-next to avoid two conflicting batching implementations, or it's too early?
reagent-next is not finished, results vary depending on the project using it.
There is no time estimate for when or if Reagent will have its next release. It's a lot of work for the only last active benevolent maintainer (Juho Teperi) to do. A sponsorship could help making it happening.
Yeah, kind of assumed that was the status. Did a quick test of reagent-next, but looks like there are a few errors in our project. I'll see if I can find the cause and work around them.
Ok, so as well as dispatch-sync it threw up a few bugs in our code where there was a setState called repeatedly in a component-did-update which didn't seem to cause errors before. Other than that, it seems to work and noticeably boost performance compared to reagent@master.