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
Describe the bug
Despite this test passing, for the first render the state is always undefined.
To Reproduce
Steps to reproduce the behavior:
import useEpic
use it in a component with an Epic that returns an either a BehaviorSubject with initial state or an observable that pipes to startWith
Rely on (or just log) that state on the component render
Expected behavior
The state should be available on the first render
Additional context
One solution would be to subscribe and unsubscribe immediately in first render to get the initial state. If that solution is used we should give a way to opt out, because that could cause weirdness with other peoples observables.
The text was updated successfully, but these errors were encountered:
Describe the bug
Despite this test passing, for the first render the state is always
undefined
.To Reproduce
Steps to reproduce the behavior:
useEpic
BehaviorSubject
with initial state or an observable that pipes tostartWith
Expected behavior
The state should be available on the first render
Additional context
One solution would be to subscribe and unsubscribe immediately in first render to get the initial state. If that solution is used we should give a way to opt out, because that could cause weirdness with other peoples observables.
The text was updated successfully, but these errors were encountered: