re-frisk icon indicating copy to clipboard operation
re-frisk copied to clipboard

Reagent 2 / React 19 compatibility

Open Deraen opened this issue 2 months ago • 1 comments

Because React 19 removes the old react-dom/render API, if user choose to update to Reagent 2 and React 19, all libs using Reagent to render components into DOM need to move the new reagent.dom.client API.

I think it is possible to also keep supporting old React versions by checking either react/version or existence on react-dom/render, and then choose to either use reagent.dom or reagent.dom.client.

Deraen avatar Oct 31 '25 08:10 Deraen

See https://github.com/metosin/reagent-dev-tools/commit/0588f3f9e928dd0ca0f2cc2121451ec29670fb25 for one example of checking for React 19.

Re-frame-10x uses a different solution, where a difference namespace can be preloaded to choose between React 17 or 18 (and 19) support: https://github.com/day8/re-frame-10x/blob/master/src/day8/re_frame_10x/preload/react_18.cljs

I see re-frisk also patches some Reagent functions. E.g. run-queues was updated in 2.0.0 so that would need a refresh.

Deraen avatar Oct 31 '25 10:10 Deraen