re-frame

2025-01-22T17:13:49.624309Z

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?

👀 1
juhoteperi 2025-01-28T09:32:10.720999Z

Yeah I don't recommend the reagent-next branch, the demo site shows it is quite broken.

👍 2
p-himik 2025-01-22T17:15:59.377499Z

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.

2025-01-22T17:19:03.860089Z

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.

p-himik 2025-01-22T17:19:56.915679Z

@luis.cerritosor In case it's still relevant.

2025-01-22T17:20:24.494899Z

I also have an experimental project which is "kind-of-compatible" with the Reagent API, which is compatible with React 19.

Luis Cerritos 2025-01-22T17:24:00.090239Z

Thank you @p-himik I will try that reagent-next 😄

2025-01-22T17:24:06.402049Z

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

2025-01-24T12:36:37.367169Z

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?

2025-01-24T12:40:54.860929Z

reagent-next is not finished, results vary depending on the project using it.

👍 1
2025-01-24T12:45:46.042009Z

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.

👍 2
2025-01-24T12:51:30.324709Z

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.

2025-01-24T13:53:17.546629Z

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.