Repository navigation
Commit 4b2cebf
perf(mobile): thread rows no longer re-render when another thread streams
useConfirmDeleteThread called no hooks, so the compiler skipped it and the
delete handler was a new closure every render. HomeScreen and the sidebar
wrapped props callbacks as `props.onX(...)`, which the compiler caches on
the whole props object. Together these gave every memoized ThreadListV2Row
new handler props on each parent render.
The delete confirmation is now a plain function, and the handlers read the
destructured callbacks they call.
Co-Authored-By: Claude Opus 5.5 <[email protected]>1 parent f2ebeea commit 4b2cebf
3 files changed
Lines changed: 44 additions & 27 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
415 | 415 | | |
416 | 416 | | |
417 | 417 | | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
418 | 430 | | |
419 | | - | |
| 431 | + | |
420 | 432 | | |
421 | 433 | | |
422 | | - | |
| 434 | + | |
423 | 435 | | |
424 | 436 | | |
425 | | - | |
| 437 | + | |
426 | 438 | | |
427 | 439 | | |
428 | | - | |
| 440 | + | |
429 | 441 | | |
430 | 442 | | |
431 | | - | |
| 443 | + | |
432 | 444 | | |
433 | 445 | | |
434 | | - | |
| 446 | + | |
435 | 447 | | |
436 | 448 | | |
437 | | - | |
| 449 | + | |
438 | 450 | | |
439 | | - | |
| 451 | + | |
440 | 452 | | |
441 | 453 | | |
442 | 454 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
193 | 193 | | |
194 | 194 | | |
195 | 195 | | |
196 | | - | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
197 | 199 | | |
| 200 | + | |
198 | 201 | | |
199 | | - | |
200 | | - | |
201 | | - | |
202 | | - | |
203 | | - | |
204 | | - | |
205 | | - | |
206 | | - | |
207 | | - | |
208 | | - | |
209 | | - | |
210 | | - | |
211 | | - | |
212 | | - | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
213 | 214 | | |
214 | 215 | | |
215 | 216 | | |
| |||
662 | 663 | | |
663 | 664 | | |
664 | 665 | | |
665 | | - | |
| 666 | + | |
| 667 | + | |
666 | 668 | | |
667 | 669 | | |
668 | 670 | | |
| |||
693 | 695 | | |
694 | 696 | | |
695 | 697 | | |
696 | | - | |
| 698 | + | |
| 699 | + | |
697 | 700 | | |
698 | 701 | | |
699 | 702 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
484 | 484 | | |
485 | 485 | | |
486 | 486 | | |
| 487 | + | |
| 488 | + | |
487 | 489 | | |
488 | | - | |
| 490 | + | |
489 | 491 | | |
490 | 492 | | |
491 | 493 | | |
492 | 494 | | |
493 | 495 | | |
494 | 496 | | |
495 | | - | |
| 497 | + | |
496 | 498 | | |
497 | 499 | | |
498 | 500 | | |
| |||
0 commit comments