π€Action
Initializing an Action:
// create an Action, that accepts number as its value
const multiplyAction = new Action<number>();multiplyAction instanceof Subject // false
multiplyAction instanceof Observable // trueAccessing the value:
// access the value
console.log(multiplyAction.value()) // logs undefined
// dynamically access the value
multiplyAction.subscribe(value => {
console.log(value) // will log future values
// do something with the value here
});Dispatching a value:
Creating a stream:
Action vs Units vs BehaviorSubject
Configuration Options
Last updated
Was this helpful?