Commit f2d0d3d
Use refetchComponent explicitly in retry path
Previous commit's retry path used resetErrorBoundary + onReset state
mutation alone — RSCRoute would auto-fetch on the post-reset render
because props had changed. Functional, but didn't actually demonstrate
useRSC().refetchComponent, which is the canonical RoR Pro RSC retry
API per rsc-troubleshooting.md.
Switch to: refetchComponent('LiveActivity', correctedProps) primes the
cache, then resetErrorBoundary fires; the post-reset render hits cache
instead of triggering a second fetch. This shows the explicit API call
the docs recommend, while still handling our intentional-error case
(refetching with simulateError=false instead of the original throwing
props).
Page description updated to mention refetchComponent.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent df039e2 commit f2d0d3d
2 files changed
Lines changed: 29 additions & 25 deletions
File tree
- client/app/bundles/server-components
- components
- ror_components
Lines changed: 28 additions & 24 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
7 | | - | |
8 | | - | |
9 | | - | |
10 | | - | |
11 | | - | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
| 6 | + | |
22 | 7 | | |
23 | 8 | | |
24 | 9 | | |
25 | 10 | | |
| 11 | + | |
26 | 12 | | |
27 | 13 | | |
28 | 14 | | |
| |||
34 | 20 | | |
35 | 21 | | |
36 | 22 | | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
37 | 35 | | |
38 | 36 | | |
39 | 37 | | |
| |||
51 | 49 | | |
52 | 50 | | |
53 | 51 | | |
54 | | - | |
55 | | - | |
56 | | - | |
| 52 | + | |
57 | 53 | | |
58 | 54 | | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | | - | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
64 | 68 | | |
65 | 69 | | |
66 | 70 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
72 | 72 | | |
73 | 73 | | |
74 | 74 | | |
75 | | - | |
| 75 | + | |
76 | 76 | | |
77 | 77 | | |
78 | 78 | | |
| |||
0 commit comments