-
-
Notifications
You must be signed in to change notification settings - Fork 120
Closed
Labels
Description
- Check if updating to the latest version resolves the issue
Environment
- I am using
@preact/signals-core - I am using
@preact/signals - I am using
@preact/signals-react- I understand usage changed in v2, and I've followed the React Integration instructions
Describe the bug
A simple signal using component
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.
To Reproduce
Steps to reproduce the behavior:
https://github.com/Artur-/react19-signals-tests-babel
npm i --legacy-peer-deps
npm run dev
Expected behavior
It should show "Hello: world" like with React 18
return <span>Hello: {mySignal.value}</span>;
also works fine
jean343, bahaabelala, trandai1106 and 1linan