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 a2237df commit 35c3324Copy full SHA for 35c3324
react/useFormStatus/src/App.tsx
@@ -6,7 +6,7 @@ const Componente = () => {
6
return <button type="submit">FORM IS {pending || "NOT"} PENDING</button>;
7
};
8
9
-function pausa(ms) {
+function pausa(ms: number | undefined) {
10
return new Promise((resolve) => setTimeout(resolve, ms));
11
}
12
@@ -18,7 +18,7 @@ function App() {
18
return (
19
<div className="sensorario-container light">
20
<h2>useFormStatus()</h2>
21
- <form action={action}>
+ <form onSubmit={(e) => { e.preventDefault(); action(); }}>
22
<Componente />
23
</form>
24
</div>
0 commit comments