This commit is contained in:
@@ -14,16 +14,16 @@ const RegisterFormSchema = Schema.Struct({
|
||||
class RegisterForm extends Effect.Service<RegisterForm>()("RegisterForm", {
|
||||
scoped: Form.make({
|
||||
schema: RegisterFormSchema,
|
||||
initialValue: { email: "", password: "" },
|
||||
initialEncodedValue: { email: "", password: "" },
|
||||
})
|
||||
}) {}
|
||||
|
||||
class RegisterPage extends Component.makeUntraced(function* RegisterPage() {
|
||||
const form = yield* RegisterForm
|
||||
const emailInput = yield* form.useInput({ path: ["email"], defaultValue: "" })
|
||||
const passwordInput = yield* form.useInput({ path: ["password"], defaultValue: "" })
|
||||
const emailInput = yield* Form.useInput(form, { path: ["email"] })
|
||||
const passwordInput = yield* Form.useInput(form, { path: ["password"] })
|
||||
|
||||
yield* useFork(() => Stream.runForEach(form.latestValueSubscribable.changes, Console.log), [])
|
||||
yield* useFork(() => Stream.runForEach(form.valueRef.changes, Console.log), [])
|
||||
|
||||
return (
|
||||
<Container>
|
||||
|
||||
Reference in New Issue
Block a user