-
Notifications
You must be signed in to change notification settings - Fork 57
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor(react-signals): simplify the implementation #2657
Conversation
# Conflicts: # package-lock.json # packages/ts/react-signals/src/EventChannel.ts # packages/ts/react-signals/src/Signals.ts
…reateSignalChannel`
… to support multi-subscription
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2657 +/- ##
==========================================
- Coverage 92.17% 92.16% -0.02%
==========================================
Files 78 76 -2
Lines 2454 2449 -5
Branches 634 636 +2
==========================================
- Hits 2262 2257 -5
+ Misses 145 144 -1
- Partials 47 48 +1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Apart from some points I didn't fully understand (mentioned down there), In general, I like the way things got simpler. However, there are things I don't like:
In the currently existing implementation (main branch), the signal was isolated, while now it know about an external thing called channel and how it connects to the server and etc. SignalChannel also knows about the signal (ValueSignal), so now they are very coupled together.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The followings seems to be missing:
- Tests for
SubscriptionManager
'scancel
andsubscription
public methods. - Tests for
FullStackSignal
'spending
,error
,updating
public methods.
And, a misbehaviour is now happening at runtime, that is an update is sent to the server before even any call for subscription is made to the server. It is trying to set a null
value on server-side instance, but since no subscription exists yet for the targeted signal instance, it simply fails with IllegalStateException
causing unnecessary buzz in the console (both on client and on server).
Other details are commented on the code:
Quality Gate passedIssues Measures |
No description provided.