insomnia icon indicating copy to clipboard operation
insomnia copied to clipboard

Upgrade to React 19

Open jackkav opened this issue 3 months ago • 4 comments

closes INS-1450

POC:

  • run some codemods and bump to react 19
  • mismerge libraries don't support react 19.

What can we do to resolve this and unblock our upgrade path?

@CurryYangxx @cwangsmv @yaoweiprc

Update Sept25:

mismerge is unblocked

todo

  • [x] fix lint and types
  • [x] establish what should be done about useEffects and deps
  • [ ] test

Notes:

  • will use react compiler later in a seperate PR
  • lots of tests failure from timeouts and loose selectors, going to split out a bump to playwright and react-aria to hopefully help

jackkav avatar Sep 05 '25 15:09 jackkav

Cool! 🚀

image

But I don't think it's safe to remove the useCallback or useMemo before setting up the react-compiler(and it's still on rc, no stable version yet) and confirming it works for all of our scenarios, as it causes regressions.

And it seems all the icon files have removed the usage of SVGProps but not removed the imports, and their 'props' implicitly have an 'any' type. It seems they're not ready yet?

ZxBing0066 avatar Sep 08 '25 08:09 ZxBing0066

Seems we need to find a replacement for mismerge.

CurryYangxx avatar Sep 15 '25 08:09 CurryYangxx

Sorry for the late reply. The mismerge core defines a custom element 'mis-merge3' and doesn’t actually depend on any specific React version. It was only the @mismerge/react package that deliberately restricted the React version. I’ve removed the dependency on @mismerge/react and now only rely on @mismerge/core. https://github.com/Kong/insomnia/pull/9145

yaoweiprc avatar Sep 16 '25 09:09 yaoweiprc

Awesome work @yaoweiprc I will take another look at this today

@ZxBing0066 I'll try to explore our options here and figure out a path forward.

jackkav avatar Sep 25 '25 08:09 jackkav