@@ -110,15 +110,15 @@ This state is called the "optimistic" because it is used to immediately present
110110
1111114. **(Optional) wait for Suspense**: If ` newValue` suspends, React continues showing ` ' b' ` .
112112
113- 5. **Single render commit**: Finally, the ` newValue` is commits for ` value` and ` optimistic` .
113+ 5. **Single render commit**: Finally, the ` newValue` commits for ` value` and ` optimistic` .
114114
115115There's no extra render to "clear" the optimistic state. The optimistic and real state converge in the same render when the Transition completes.
116116
117117<Note>
118118
119119#### Optimistic state is temporary {/*optimistic-state-is-temporary*/}
120120
121- Optimistic state is only renders while an Action is in progress, otherwise ` value` is rendered.
121+ Optimistic state only renders while an Action is in progress, otherwise ` value` is rendered.
122122
123123If ` saveChanges` returned ` ' c' ` , then both ` value` and ` optimistic` will be ` ' c' ` , not ` ' b' ` .
124124
@@ -403,7 +403,7 @@ export default function App() {
403403 }
404404
405405 if (optimisticIsLiked !== isLiked) {
406- console .log (' ✅ rendering optmistic state: ' + optimisticIsLiked);
406+ console .log (' ✅ rendering optimistic state: ' + optimisticIsLiked);
407407 } else {
408408 console .log (' ✅ rendering real value: ' + optimisticIsLiked);
409409 }
@@ -1071,7 +1071,7 @@ startTransition(() => {
10711071})
10721072` ` `
10731073
1074- Since ` useTransition` uses ` useOptimsitic ` for ` isPending` under the hood, this is equivalent to option 1.
1074+ Since ` useTransition` uses ` useOptimistic ` for ` isPending` under the hood, this is equivalent to option 1.
10751075
107610763. **Add a ` pending` flag in your reducer**
10771077
0 commit comments