Skip to content

Commit a1cc2ab

Browse files
authored
Added missing prop to useActionState example (#8308)
* added missing prop to useactionstate example * remove pending from total in first example
1 parent 55a317d commit a1cc2ab

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/content/reference/react/useActionState.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ export default function Checkout() {
177177
<button onClick={handleClick}>Add Ticket{isPending ? ' 🌀' : ' '}</button>
178178
</div>
179179
<hr />
180-
<Total quantity={count} />
180+
<Total quantity={count} />
181181
</div>
182182
);
183183
}
@@ -190,11 +190,11 @@ const formatter = new Intl.NumberFormat('en-US', {
190190
minimumFractionDigits: 0,
191191
});
192192

193-
export default function Total({quantity, isPending}) {
193+
export default function Total({quantity}) {
194194
return (
195195
<div className="row total">
196196
<span>Total</span>
197-
<span>{isPending ? '🌀 Updating...' : formatter.format(quantity * 9999)}</span>
197+
<span>{formatter.format(quantity * 9999)}</span>
198198
</div>
199199
);
200200
}

0 commit comments

Comments
 (0)