feat: add createSubscriptionToInvalidationState - #85
Conversation
Solid counterpart of React Relay's useSubscribeToInvalidationState. Subscribes a callback to the invalidation state of a set of data IDs, re-establishing the subscription when the IDs change and disposing it on cleanup. Both the data IDs and the callback accept a MaybeAccessor. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
🦋 Changeset detectedLatest commit: 012e77b The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
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 |
|
@codex review |
commit: |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #85 +/- ##
==========================================
+ Coverage 90.95% 91.19% +0.23%
==========================================
Files 20 21 +1
Lines 741 761 +20
Branches 143 146 +3
==========================================
+ Hits 674 694 +20
Misses 57 57
Partials 10 10 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
solid-relay | 012e77b | Commit Preview URL Branch Preview URL |
Aug 26 2026, 03:46 AM |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 012e77b610
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| dispose: () => { | ||
| disposable?.dispose(); | ||
| disposable = null; |
There was a problem hiding this comment.
Keep disposal latched across effect executions
If dispose() is called before the effect's initial execution, or if the dataIDs/environment changes afterward, this only disposes the current handle and leaves the effect active, so it subsequently installs a new subscription and invokes callbacks despite the caller having stopped listening. Track a permanently disposed state and prevent later effect executions from subscribing.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Makes sense, but I'd accept the hole
No description provided.