Closed jviide closed 3 months ago
Latest commit: 3e58027e0b8aaabc21c68a3e1c0017128c50b443
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.
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
Name | Link |
---|---|
Latest commit | 3e58027e0b8aaabc21c68a3e1c0017128c50b443 |
Latest deploy log | https://app.netlify.com/sites/preact-signals-demo/deploys/65f22709c0ab690008c88d63 |
Deploy Preview | https://deploy-preview-523--preact-signals-demo.netlify.app |
Preview on mobile | Toggle QR Code...Use your smartphone camera to open QR code link. |
To edit notification comments on pull requests, go to your Netlify site configuration.
This pull request uses the
untracked()
function to simplify the implementation of theSignal.prototype.subscribe
method. The functionality of the method stays the same.Byte savings fall between 2 and 19 bytes, depending on the bundling output format:
The downside is that
untracked
can't get tree-shaken as easily. Fortunately, based on a quick test that only importedsignal
+computed
+effect
, the amount of removed code is enough that the end result seems to save bytes also in cases whereuntracked
would have been tree-shaken before.