Closed kevinschaffter closed 1 year ago
I was under the impression that this was a preact adapter only optimisation, that is not present in react. But it would be nice to have in react. https://github.com/preactjs/signals/blob/main/packages/preact/README.md#rendering-optimizations
@yoroshikun it works in React today, the types just don't line up.
When passing a signal directly into JSX in an attempt to bypass VDOM leads to the below TS error. It does work as expected from a functional standpoint however.
Type 'ReadonlySignal<string>' is not assignable to type 'ReactNode'.ts
"@preact/signals-react": "^1.2.1"
"@types/react": "^18.0.24"
Just wondering what the recommended approach is around this? Thank you!