Closed jinyus closed 7 months ago
All modified and coverable lines are covered by tests :white_check_mark:
Comparison is base (
bde8f95
) 100.00% compared to head (423ddc4
) 100.00%. Report is 49 commits behind head on main.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Description
Before the PR chaining wasn't allowed:
This is because in the example above,
queryBeacon
would be adebounced
beacon and setting its value would not pass the mutation to the writable, then to the filtered beacon to be processed. This PR does just that.When a write is made to a chained beacon, the write is passed up to all its parents before it reaches to itself. This also means that the mutation might not reach it at all. For example:
This code will pass up the mutation to the
writable
which then passes it to thefiltered
beacon, but the filtered beacon rejects strings with less than 3 characters so the value will be dropped and the update will never reach thedebounced
beacon. There is also no rollback support so the mutations made to the writable will persist. ie: the writeable's value is nowa
while the filtered and debounced beacons still has a value of an empty string.