Page 1 of 1

[REACT] React 19 compatibility

Posted: Thu Dec 05, 2024 10:04 pm
by jimmycallin

Hi!

React 19 was just released in stable, and my initial trial to upgrade failed on Bryntum rendering. Would be great if you could prioritize React 19 support (unless you already do support React 19 and there is something else spooky happening for me).

See screenshot for my error message. Let me know if you have trouble reproducing it and I'll dig deeper.

Thanks.


Re: [REACT] React 19 compatibility

Posted: Thu Dec 05, 2024 10:19 pm
by marcio

Hey jimmycallin,

Thanks for reaching out.

We're checking our demos and we don't have this error.

Could you please provide a runnable test case so we can check what's happening there?


Re: [REACT] React 19 compatibility

Posted: Fri Dec 06, 2024 12:24 am
by jimmycallin

Hi!

I managed to pin it down to having a tree column renderer outputting a react node. Please see my attached example. You can see in the logs that the same error message as previously reported occurs. If you downgrade to React 18, it works.

    {
      type: "tree",
...
      renderer: () => <HelloWorld />,
    }

Hope this helps!


Re: [REACT] React 19 compatibility

Posted: Fri Dec 06, 2024 12:28 am
by jimmycallin

Forgot the file :)


Re: [REACT] React 19 compatibility

Posted: Fri Dec 06, 2024 8:48 am
by sergey.maltsev

Hi!

Thank you for the details.
We are working on a fix here https://github.com/bryntum/support/issues/10448

You can try this workaround until that fixed
Add this code replacing DomHelper.isReactElement static method somewhere in your app.

import { DomHelper } from '@bryntum/core-thin';

// @ts-ignore
DomHelper.isReactElement = element => {
    return element?.$$typeof === Symbol.for('react.element') || element?.$$typeof === Symbol.for('react.transitional.element');
}

Re: [REACT] React 19 compatibility

Posted: Fri Dec 06, 2024 10:41 am
by jimmycallin

initial impression is that the workaround seems to be working - great, thanks!