elements icon indicating copy to clipboard operation
elements copied to clipboard

Support for React 19 / Compatibility Issue with unmountComponentAtNode

Open Victor-Mestre-Sybo opened this issue 8 months ago • 6 comments

We're using this library in a Next.js project. After upgrading to the latest Next.js version (v15), we also updated to React 19 since this is now the minimum required version.

However, it appears that elements-core is still relying on the now-deprecated unmountComponentAtNode API, which is no longer supported in React 19. This causes our build to fail, effectively blocking us from upgrading beyond Next.js 14 / React 18.

Are there any plans to update the library for React 19 compatibility?

Thanks in advance!

Victor-Mestre-Sybo avatar Apr 22 '25 08:04 Victor-Mestre-Sybo

I use @stoplight/elements on a Docusaurus project and it is not compatible with React 19

trinitystake avatar Apr 29 '25 08:04 trinitystake

I don't know who to ping here, so I'm gonna ping @SB-ChetanKorde who's the last active contributor.

Are there any eyes on this issue? At least a response from the maintainers would be nice, either with a "sorry, React 19 is not planned" or "we're planning to upgrade at ". Just anything to break the silence.

This issue has been sitting around since April, and has basically only gotten what amounts to "me too!" reply from another user.

At this point, we'll have to ditch Stoplight in our project to be able to update other dependencies, which would be unfortunate, since it's otherwise been a pretty nice package.

oliver-roer avatar Sep 17 '25 07:09 oliver-roer

I do have the same issue. Any update here?

henrique-maio avatar Sep 23 '25 18:09 henrique-maio

Sorry for being annoying, but it'd be nice to have someone acknowledge this issue, and get more than thumbs-ups and "me too"s. @SB-pradeep-bande @SB-ChetanKorde @SB-rohandhiman @prafullaAtSB @SB-akshaythakar @SB-virendrasolanke I can see you've all authored recent commits on main. How do we get some eyes on this issue?

Unfortunately, we've started building our own internal replacement at this point, which may soon be ready, so we might stop using Stoplight. For the sake of all the 👍ers and "me too"ers here, I still want to push for some form of reply to this issue though.

oliver-roer avatar Oct 01 '25 12:10 oliver-roer

Hi, I'm a developer in a team which is now responsible for the maintenance of the @stoplight/elements project.

First of all, apologies for no response for such a long time. Currently we're looking at this issue. Unfortunately we weren't able to reproduce the original problem with the unmountComponentAtNode API even while testing Elements in a simple app built using Next.js 15 + React 19, but we discovered other issues related to the legacy code which is not supported anymore in React 19.

I'm afraid we might not be able to upgrade Elements to React 19 in the near future as this is a more complex task which would possibly require as well an upgrade of other libraries. However what we could do for now is to replace the legacy code causing issues with React 19. The changes are available in the latest version (9.0.11) which has just been released.

Could you please test it with your environments and let us know in case there are still any compatibility issues with React 19? Also, if you could provide a sandbox example, that would be very helpful.

darekplawecki avatar Nov 03 '25 13:11 darekplawecki

Receive this on 9.0.12 when building a nextjs 16 app via webpack.

./node_modules/@stoplight/elements-core/index.mjs Attempted import error: 'render' is not exported from 'react-dom' (imported as 'ReactDOM')

lifeofcoding avatar Dec 02 '25 19:12 lifeofcoding