Form refactoring
All checks were successful
Lint / lint (push) Successful in 11s

This commit is contained in:
Julien Valverdé
2025-09-23 19:38:30 +02:00
parent ed1efb41cd
commit 9033fcbb32
2 changed files with 38 additions and 11 deletions

View File

@@ -12,7 +12,7 @@ const RegisterFormSchema = Schema.Struct({
})
class RegisterForm extends Effect.Service<RegisterForm>()("RegisterForm", {
scoped: Form.make({
scoped: Form.service({
schema: RegisterFormSchema,
initialEncodedValue: { email: "", password: "" },
})
@@ -64,7 +64,7 @@ class RegisterPage extends Component.makeUntraced(function* RegisterPage() {
const RegisterRoute = Component.makeUntraced(function* RegisterRoute() {
const context = yield* useContext(RegisterForm.Default)
const context = yield* useContext(RegisterForm.Default, { finalizerExecutionMode: "fork" })
const RegisterRouteFC = yield* Effect.provide(RegisterPage, context)
return <RegisterRouteFC />