Lifecycle
Unlike React components, in Recks component function is executed only once in a given component lifetime:
This means that it's safe to create Subjects here to store component state, for example
Updates
All incoming property updates are provided via props$ — an Observable, passed as a first argument to your component. See Subcomponents section for details.
And only you control the output updates by placing your Observables where needed!
Automatic subscription
When you use an Observable anywhere in your component:
Recks will automatically subscribe to that stream when the Component is mounted and will unsubscribe from it when the Component is unmounted. You don't have to worry about that!
destroy$
Additionally, you can utilize lifecycle stream, that emits on Component unmount. It emits once and then completes.
Last updated