preactjs / signals

Manage state with style in every framework
https://preactjs.com/blog/introducing-signals/
MIT License
3.76k stars 91 forks source link

Fix SignalValue component when using react-transform #422

Closed andrewiggins closed 10 months ago

andrewiggins commented 1 year ago

When using the react-transform, components aren't automatically tracked for signal usage. So the SignalValue component isn't reactive to signal changes. This PR manually codes the SignalValue to use useSignals to track signal usage regardless of the implementation.

Related #412

changeset-bot[bot] commented 1 year ago

⚠ī¸ No Changeset found

Latest commit: b45b041e4d89f6f952af485e7dc5dd5ec780f602

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

netlify[bot] commented 1 year ago

Deploy Preview for preact-signals-demo ready!

Name Link
Latest commit b45b041e4d89f6f952af485e7dc5dd5ec780f602
Latest deploy log https://app.netlify.com/sites/preact-signals-demo/deploys/6531b921718e33000819cdb3
Deploy Preview https://deploy-preview-422--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 site configuration.

github-actions[bot] commented 1 year ago

Size Change: +1.07 kB (+1%)

Total Size: 80.8 kB

Filename Size Change
docs/dist/assets/client.********.js 47 kB +371 B (+1%)
docs/dist/nesting-********.js 1.13 kB -1 B (0%)
docs/dist/react-********.js 237 B -1 B (0%)
packages/react-transform/dist/signals-*********.js 3.55 kB +31 B (+1%)
packages/react-transform/dist/signals-transform.mjs 2.87 kB +32 B (+1%)
packages/react-transform/dist/signals-transform.umd.js 3.67 kB +30 B (+1%)
packages/react/dist/signals.js 1.62 kB +270 B (+20%) 🚨
packages/react/dist/signals.mjs 1.64 kB +341 B (+26%) 🚨
ℹī¸ View Unchanged | Filename | Size | | :--- | :---: | | `docs/dist/assets/index.********.js` | 833 B | | `docs/dist/assets/jsxRuntime.module.********.js` | 281 B | | `docs/dist/assets/preact.module.********.js` | 4.02 kB | | `docs/dist/assets/signals-core.module.********.js` | 1.46 kB | | `docs/dist/assets/signals.module.********.js` | 2.02 kB | | `docs/dist/assets/style.********.js` | 21 B | | `docs/dist/assets/style.********.css` | 1.21 kB | | `docs/dist/basic-********.js` | 244 B | | `docs/dist/demos-********.js` | 3.35 kB | | `packages/core/dist/signals-core.js` | 1.54 kB | | `packages/core/dist/signals-core.mjs` | 1.56 kB | | `packages/preact/dist/signals.js` | 1.27 kB | | `packages/preact/dist/signals.mjs` | 1.22 kB |

compressed-size-action

andrewiggins commented 10 months ago

Abandoning this for the moment. May revisit later after resolving other issues first