Skip to content

Conversation

@JoviDeCroock
Copy link
Member

We should set component.__f in Preact again to make sure we hit the branch, this ensures that the new state settling logic as seen in preactjs/preact#4760 can cooperate with signals.

The issue is when we dispatch 3 updates

  • SetHookState(new)
  • SetSignalState(new)
  • SetHookState(old)

This would result in _afterRender setting SKIP_CHILDREN for the hook but the signal wants to rightfully update.

@changeset-bot
Copy link

changeset-bot bot commented Jun 7, 2025

🦋 Changeset detected

Latest commit: dda1ef4

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@preact/signals Minor

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

@netlify
Copy link

netlify bot commented Jun 7, 2025

Deploy Preview for preact-signals-demo ready!

Name Link
🔨 Latest commit dda1ef4
🔍 Latest deploy log https://app.netlify.com/projects/preact-signals-demo/deploys/68440ff8cc0fbf0008800fba
😎 Deploy Preview https://deploy-preview-696--preact-signals-demo.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@github-actions
Copy link
Contributor

github-actions bot commented Jun 7, 2025

Size Change: +152 B (+0.17%)

Total Size: 87.8 kB

Filename Size Change
docs/dist/assets/bench.********.js 1.59 kB +1 B (+0.06%)
docs/dist/assets/index.********.js 1.09 kB +1 B (+0.09%)
docs/dist/assets/signals.module.********.js 2.08 kB +38 B (+1.86%)
docs/dist/demos-********.js 4.32 kB +2 B (+0.05%)
packages/preact/dist/signals.js 1.63 kB +57 B (+3.63%)
packages/preact/dist/signals.mjs 1.59 kB +53 B (+3.46%)
ℹ️ View Unchanged
Filename Size
docs/dist/assets/client.********.js 46.2 kB
docs/dist/assets/jsxRuntime.module.********.js 283 B
docs/dist/assets/preact.module.********.js 4.01 kB
docs/dist/assets/signals-core.module.********.js 1.5 kB
docs/dist/assets/style.********.js 21 B
docs/dist/assets/style.********.css 1.24 kB
docs/dist/basic-********.js 243 B
docs/dist/nesting-********.js 1.13 kB
docs/dist/react-********.js 239 B
packages/core/dist/signals-core.js 1.53 kB
packages/core/dist/signals-core.mjs 1.55 kB
packages/react-transform/dist/signals-*********.js 5.97 kB
packages/react-transform/dist/signals-transform.mjs 5.13 kB
packages/react-transform/dist/signals-transform.umd.js 6.08 kB
packages/react/dist/signals.js 188 B
packages/react/dist/signals.mjs 150 B

compressed-size-action

@JoviDeCroock
Copy link
Member Author

Not needed anymore with preactjs/preact#4829

@JoviDeCroock JoviDeCroock deleted the state-setting-with-signals branch July 6, 2025 08:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants