We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2534424 commit 4a6c27eCopy full SHA for 4a6c27e
src/content/reference/rsc/server-functions.md
@@ -126,14 +126,15 @@ function UpdateName() {
126
const submitAction = async () => {
127
startTransition(async () => {
128
const {error} = await updateName(name);
129
- if (error) {
130
- setError(error);
131
- } else {
132
- setName('');
133
- }
134
- })
135
136
-
+ startTransition(() => {
+ if (error) {
+ setError(error);
+ } else {
+ setName('');
+ }
+ });
137
+ };
138
return (
139
<form action={submitAction}>
140
<input type="text" name="name" disabled={isPending}/>
0 commit comments