preactjs / signals

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

chore: remove unnecessary try...finally #516

Closed OnlyWick closed 8 months ago

OnlyWick commented 8 months ago

there are no operations in the notify method that could cause program interruption.

changeset-bot[bot] commented 8 months ago

⚠️ No Changeset found

Latest commit: b406a0b3cd0ed17a1425989bb20d6c46c6fd96ae

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 8 months ago

Deploy Preview for preact-signals-demo ready!

Name Link
Latest commit b406a0b3cd0ed17a1425989bb20d6c46c6fd96ae
Latest deploy log https://app.netlify.com/sites/preact-signals-demo/deploys/65e84f149d78e80008b729bd
Deploy Preview https://deploy-preview-516--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.

developit commented 8 months ago

I don't think we can remove this try/catch: without it, a custom ._notify implementation throwing would cause the graph to become incorrect, which would break all signals+computeds in very unexpected ways.

OnlyWick commented 8 months ago

Will it happen when used together with other frameworks? I see in the core that _notify does not throw any errors.