Commit ed0983c
fix(react-bindings): getSnapshot caching (#2008)
Fixes #2006. Cold-derived `Observable` instances (`remoteParticipants$`
and similar) get read twice in strict mode, and as such, the derivative
runs multiple times, creating multiple shallow-equal arrays.
Although this isn't exactly an issue, as we had this behavior before
#1953, the emitter warning could be confusing.
Docs: GetStream/docs-content#778
---------
Co-authored-by: Anton Arnautov <[email protected]>1 parent a3bc5b8 commit ed0983c
File tree
2 files changed
+33
-2
lines changed- packages
- client/src/store
- react-bindings/src/hooks
2 files changed
+33
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
74 | 74 | | |
75 | 75 | | |
76 | 76 | | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
77 | 100 | | |
78 | 101 | | |
79 | 102 | | |
| |||
353 | 376 | | |
354 | 377 | | |
355 | 378 | | |
356 | | - | |
| 379 | + | |
357 | 380 | | |
358 | 381 | | |
359 | 382 | | |
360 | 383 | | |
361 | | - | |
| 384 | + | |
362 | 385 | | |
363 | 386 | | |
364 | 387 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
293 | 293 | | |
294 | 294 | | |
295 | 295 | | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
296 | 304 | | |
297 | 305 | | |
298 | 306 | | |
| |||
0 commit comments