-
-
Save jorroll/00e05aebaf1f0039828e89fee1b95aeb to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
controlA.value; // => 'Hi' | |
const savedState = controlA.replayState(); | |
controlA.setValue('Hello'); | |
savedState.subscribe(controlA.source); | |
controlA.value; // => 'Hi' | |
// here we only sync the saved `disabled` state to `controlB` | |
savedState | |
.pipe(filter(({ type }) => type === 'disabled')) | |
.subscribe(controlB.source); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment