(formData)
| 14 | } |
| 15 | |
| 16 | export async function greet(formData) { |
| 17 | const name = formData.get('name') || 'you'; |
| 18 | setServerState('Hi ' + name); |
| 19 | const file = formData.get('file'); |
| 20 | if (file) { |
| 21 | return `Ok, ${name}, here is ${file.name}: |
| 22 | ${(await file.text()).toUpperCase()} |
| 23 | `; |
| 24 | } |
| 25 | return 'Hi ' + name + '!'; |
| 26 | } |
| 27 | |
| 28 | export async function increment(n) { |
| 29 | // Test loading state |
nothing calls this directly
no test coverage detected