Skip to content

Commit 652b25c

Browse files
docs: fix typo in useActionState and remove redundant async in useTransition (#8642)
* Remove redundant async in useTransition documentation * Fix typo in useActionState hook documentation
1 parent 6fba260 commit 652b25c

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

‎src/content/reference/react/useActionState.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ button {
257257
258258
</Sandpack>
259259
260-
Every time you click "Add Ticket," React queues a call to `addToCartAction`. React shows the pending state until all the tickets are added, and then re-renders with the final state.
260+
Every time you click "Add Ticket", React queues a call to `addToCartAction`. React shows the pending state until all the tickets are added, and then re-renders with the final state.
261261
262262
<DeepDive>
263263

‎src/content/reference/react/useTransition.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -661,7 +661,7 @@ export default function TabButton({ action, children, isActive }) {
661661
return <b className="pending">{children}</b>;
662662
}
663663
return (
664-
<button onClick={async () => {
664+
<button onClick={() => {
665665
startTransition(async () => {
666666
// await the action that's passed in.
667667
// This allows it to be either sync or async.

0 commit comments

Comments
 (0)