-
Notifications
You must be signed in to change notification settings - Fork 84
Closed
Description
live demo: https://codesandbox.io/s/rxjs-hooks-bug-zuvek?fontsize=14
Only newer version of react(with setState bail out feature) have this bug. I use 16.10.2
I think the bug is caused by this line:
rxjs-hooks/src/use-observable.ts
Line 54 in 203b98f
| setState(value) |
If my observable emit same mutable object again and again, the subscriber component will not re-render.
Because setState will bail out of updates if the next value is the same as the previous one
If the same mutable object contain different data among renders, we will not see the latest data.
Metadata
Metadata
Assignees
Labels
No labels