diff --git a/packages/core/README.md b/packages/core/README.md index e3bbbcf..a9bc5fd 100644 --- a/packages/core/README.md +++ b/packages/core/README.md @@ -44,17 +44,17 @@ interface Login { password: string; } -const Field = fieldOf(); - const schema: ObjectSchema = object({ email: string().email().required(), password: string().required(), }); +const Field = fieldOf(); + const SignIn = memo((): ReactElement => { + const handleSubmit = useCallback((values: Login): void => { const { email, password } = values; - // Use the validated value to sign in! }, []); diff --git a/packages/native/README.md b/packages/native/README.md index 251fe3f..76233f7 100644 --- a/packages/native/README.md +++ b/packages/native/README.md @@ -39,7 +39,7 @@ To make using forms in React Native as simple as possible, `@lynxts/native` prov It also provides a helper `TextField` component based on the [TextInput](https://reactnative.dev/docs/textinput) foundational component. This component adds a label and error handling and its intention is for users to quickly jump into using simple forms. However, we strongly recommend creating you own [custom field](../core/README.md#custom-fields) abstractions to get better control and customization. ```tsx -import { FormProvider, fieldOf } from "@lynxts/core"; +import { FormProvider } from "@lynxts/core"; import { SubmitButton, textFieldOf } from "@lynxts/native"; import { ReactElement, memo, useCallback } from "react"; import { ObjectSchema, object, string } from "yup"; @@ -49,17 +49,17 @@ interface Login { password: string; } -const TextField = textFieldOf(); - const schema: ObjectSchema = object({ email: string().email().required(), password: string().required(), }); +const TextField = textFieldOf(); + const SignIn = memo((): ReactElement => { + const handleSubmit = useCallback((values: Login): void => { const { email, password } = values; - // Use the validated value to sign in! }, []); diff --git a/packages/web/README.md b/packages/web/README.md index a97aa53..0bbdc24 100644 --- a/packages/web/README.md +++ b/packages/web/README.md @@ -38,7 +38,6 @@ To make using forms in React.js web applications as simple as possible, `@lynxts Additionally, this package provides helper components of the basic form elements: ``, `