-
-
Notifications
You must be signed in to change notification settings - Fork 97
New issue
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
Fix rendering signals as text when using react-transform #439
Conversation
🦋 Changeset detectedLatest commit: edf4fae The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
✅ Deploy Preview for preact-signals-demo ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
Size Change: +600 B (+1%) Total Size: 80.3 kB
ℹ️ View Unchanged
|
@@ -146,11 +146,15 @@ const dispatcherMachinePROD = createMachine({ | |||
``` | |||
*/ | |||
|
|||
export let isAutoSignalTrackingInstalled = false; | |||
|
|||
let store: EffectStore | null = null; | |||
let lock = false; | |||
let currentDispatcher: ReactDispatcher | null = null; | |||
|
|||
function installCurrentDispatcherHook() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this function still called on top level of @preact/signals-react
so i there is a difference
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR doesn't change the functionality of @preact/signals-react
in that importing that package still hooks into internals. Changing that behavior will come later since it is a break change. This PR is starting to setup some infra to eventually make that behavior (hooking into React internals) opt-in. So no difference at the moment for people using @preact/signals-react
but that will change eventually.
As suggested by @developit, disable
useSignals
when the auto tracking hook is installed since components can instead rely on that behavior. Also, adduseSignals
to the SignalValue component to fix it when used with the babel transform