Replies: 5 comments 1 reply
-
This could be done via a set of extension methods without having to update the type signature! |
Beta Was this translation helpful? Give feedback.
-
The idea never touched my mind I'm digging about something more general, |
Beta Was this translation helpful? Give feedback.
-
Signal hooks for sure. I think that would be possible in general and would love to add support for it. It could be a wrapper signal that adds the functionality just like a change stack too |
Beta Was this translation helpful? Give feedback.
-
Most of the logic is already there! Signal handle transmission but you just need confirmation/infirmation upfront and lifecycle of previous signal. When you |
Beta Was this translation helpful? Give feedback.
-
I don't know if it could be a wrapper or direct implementation. |
Beta Was this translation helpful? Give feedback.
-
This is an evolving discussion around previous/current value of a signal
and how pre/post check hook can influence the connection and help manage lifecycle.
Currently if you want to access previous value of a subscribed signal you have to
Signature would have been much better with
subscribe(previous, current)
for chaining.Can be expressed with elegance when non required
$signal.subscribe((_, current) { });
Maybe a real consideration for people pushing Signals it a lot of sugar to not repeat the var and less error prone.
As a general remark Signals should get inspired (copy without questions) functional signatures and move away from oop.
equalityCheck
can be hacked in the meantime, it has the right signature but come on ;DBeta Was this translation helpful? Give feedback.
All reactions