Commit be6d4a0
committed
fix: sync index prop during render to prevent infinite loop (fix #395)
Replace useEffect-based prop sync with synchronous dispatch during
render to eliminate the one-render lag that causes an infinite
ping-pong loop when the index prop changes rapidly1 parent a23cc7c commit be6d4a0
1 file changed
Lines changed: 7 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
70 | 70 | | |
71 | 71 | | |
72 | 72 | | |
73 | | - | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
74 | 79 | | |
75 | | - | |
| 80 | + | |
76 | 81 | | |
77 | 82 | | |
78 | 83 | | |
| |||
0 commit comments