Closed KillerMax4299 closed 9 months ago
Hey @KillerMax4299 :wave: v2 is a new major release of signals-react and as such has some breaking changes. Check the Changelog for details on the breaking change.
Have you added import "@preact/signals-react/auto";
to the root of your application? That's the fastest way to get the same behavior as v1.3.8.
Just realizing I updated the Readme with the new instructions but didn't but a larger notice about the v2 changes. Lemme do that.
Hey @andrewiggins, added import "@preact/signals-react/auto"
does work. Thanks for mentioning that.
The v2.0.0
changelog says: "Check out the new Readme for the newly supported ways of using signals in React". But where is the new ReadMe?
@XantreGodlike No useSignals
hook is exported in the @preact/signals-react
in version 2.0.0
@XantreGodlike No
useSignals
hook is exported in the@preact/signals-react
in version2.0.0
It've been never exported from the main entry
@XantreGodlike No
useSignals
hook is exported in the@preact/signals-react
in version2.0.0
I've never been exported from the main entry
Well, the documentation asks to import useSignals
from @preact/signals-react
and when I try to do that, it gives me an error. Refer the screenshot below for the documentation where it is mentioned:
@JoviDeCroock @noopurphalak
@XantreGodlike Okay, got it...
Hey @KillerMax4299 👋 v2 is a new major release of signals-react and as such has some breaking changes. Check the Changelog for details on the breaking change.
Have you added
import "@preact/signals-react/auto";
to the root of your application? That's the fastest way to get the same behavior as v1.3.8.Just realizing I updated the Readme with the new instructions but didn't but a larger notice about the v2 changes. Lemme do that.
adding this one inside App.js works too. Thanks!
This doesn't update the count value in the button
But this does
But both should work right. Later was just an optimization (optional)
I found this issue in
@preact/signals-react
v2.0.0 but while in v1.3.8 everything works fine. So for the time being I'm just using the older version.