We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I'm using @preact/signals-react v1.2.2. when creating a signal in a component, i.e:
@preact/signals-react
v1.2.2
import React from "react"; import { useSignal } from "@preact/signals-react"; export const MyComponent = (): JSX.Element => { const count = useSignal(0); return ( <div> <button onClick={() => count.value++}>Increase</button> <p>Count: {count.value}</p> </div> ); };
clicking the button doesn't render any change, however the following works:
<p>Count: {count}</p>
however the following type error is thrown: Type 'Signal<number>' is not assignable to type 'ReactNode'.
Type 'Signal<number>' is not assignable to type 'ReactNode'.
Is there a current workaround, or any further info needed to debug this? Thanks.
The text was updated successfully, but these errors were encountered:
Potentially a duplicate of #298
Sorry, something went wrong.
No branches or pull requests
I'm using
@preact/signals-react
v1.2.2
.when creating a signal in a component, i.e:
clicking the button doesn't render any change, however the following works:
however the following type error is thrown:
Type 'Signal<number>' is not assignable to type 'ReactNode'.
Is there a current workaround, or any further info needed to debug this?
Thanks.
The text was updated successfully, but these errors were encountered: