You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
import { signal } from "@preact/signals-react";
const mySignal = signal("world");
export default function BasicSignalView() {
return <span>Hello: {mySignal}</span>;
}
fails with React 19 rc with
Error: A React Element from an older version of React was rendered. This is not supported. It can happen if:
- Multiple copies of the "react" package is used.
- A library pre-bundled an old copy of "react" or "react/jsx-runtime".
- A compiler tries to "inline" JSX instead of using the runtime.
Alright then. I managed to get it working by changing the symbol to use from react.element to react.transitional.element in https://github.com/Artur-/signals/tree/react19, seemingly related to facebook/react#28813. It may not be the full solution for React 19 but at least I can test some things now.
Environment
@preact/signals-core
@preact/signals
@preact/signals-react
Describe the bug
A simple signal using component
fails with React 19 rc with
To Reproduce
Steps to reproduce the behavior:
https://github.com/Artur-/react19-signals-tests-babel
open http://localhost:5173/
Expected behavior
It should show "Hello: world" like with React 18
also works fine
The text was updated successfully, but these errors were encountered: