Closed jhuleatt closed 3 years ago
Turns out this is an issue with useObservable
itself. The internal state of useObservable
starts off with the data as undefined
, so when undefined
is emitted as the new data, the hook doesn't trigger a rerender, because from React's perspective nothing changed.
Reproduced with failing test "useObservable > Non-Suspense Mode > emits even if data is undefined"
I'm going to admin-merge this because #438 is a pretty active discussion so a fast fix would be beneficial, I was able to repro the original issue with a test that is now green, and useObservable
has pretty solid test coverage.
fixes #440