Skip to content

Commit 35c3324

Browse files
committed
fix(react): small TypeScript fixes
1 parent a2237df commit 35c3324

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

react/useFormStatus/src/App.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ const Componente = () => {
66
return <button type="submit">FORM IS {pending || "NOT"} PENDING</button>;
77
};
88

9-
function pausa(ms) {
9+
function pausa(ms: number | undefined) {
1010
return new Promise((resolve) => setTimeout(resolve, ms));
1111
}
1212

@@ -18,7 +18,7 @@ function App() {
1818
return (
1919
<div className="sensorario-container light">
2020
<h2>useFormStatus()</h2>
21-
<form action={action}>
21+
<form onSubmit={(e) => { e.preventDefault(); action(); }}>
2222
<Componente />
2323
</form>
2424
</div>

0 commit comments

Comments
 (0)