You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Feature request: useObservable to return the instant value on Component initialize if Observable has sync value #369
In my component, I use an useEffect to do some initialization with side effect.
consttitle=useObservable(()=>titles$);useEffect(()=>{// do initialization with title},[]);
title$ is a BehaviorSubject, so I would like the useEffect block can get the current title value directly, so that I don't need to wait another cycle for the initialization.
Activity
auver commentedon Sep 16, 2020
I also need it. The above code may solve your problem.
https://github.com/auver/rxjs-hooks