Repository navigation
Commit dc8eb1e
authored
Fix Server Function signature and two typos in 'use server' reference (#8653)
requestUsername is passed to useActionState but declared as
requestUsername(formData). useActionState calls the action with the
previous state as the first argument, so formData ends up null and
formData.get('username') throws. The useActionState reference already
covers this under "My Action cannot read form data".
Also drop a stray semicolon in the LikeButton example, where it sits in
the fragment's children and renders as text, and remove a duplicated
word in the RSC banner so it matches use-client.md.1 parent c1178e2 commit dc8eb1e
1 file changed
Lines changed: 3 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
| 8 | + | |
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| |||
139 | 139 | | |
140 | 140 | | |
141 | 141 | | |
142 | | - | |
| 142 | + | |
143 | 143 | | |
144 | 144 | | |
145 | 145 | | |
| |||
199 | 199 | | |
200 | 200 | | |
201 | 201 | | |
202 | | - | |
| 202 | + | |
203 | 203 | | |
204 | 204 | | |
205 | 205 | | |
| |||
0 commit comments