A publisher that contains the previous value #128
vladyslavsosiuk
started this conversation in
Ideas
Replies: 1 comment
-
|
@vladyslavsosiuk Thanks for the discussion. Because the publisher emits during $shared.publisher.map { (shared, $0) } // (old, new)Does this help satisfy your needs? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
I recently came across a use case where I couldn't use the
onChangereducer operator with a shared value and had to explicitly observe changes via thepublisherproperty of theSharedtype. Unlike theonChangemodifier, thepublisherproperty only provides the most recent value. Would there be interest in having a publisher property that emits both the previous and new values? I'd be happy to open a PR for it.The interface will look like this:
Beta Was this translation helpful? Give feedback.
All reactions