diff --git a/src/content/advanced-usage.mdx b/src/content/advanced-usage.mdx index c6cecd53f..e07949fc6 100644 --- a/src/content/advanced-usage.mdx +++ b/src/content/advanced-usage.mdx @@ -11,7 +11,6 @@ React Hook Form has support for native form validation, which lets you validate The following code example works as intended for validation; however, it can be improved for accessibility. ```javascript copy -import React from "react" import { useForm } from "react-hook-form" export default function App() { @@ -190,7 +189,7 @@ Let's have a look what's in each of these components. The `Form` component's responsibility is to inject all `react-hook-form` methods into the child component. ```javascript copy sandbox="https://codesandbox.io/s/react-hook-form-smart-form-component-forked-iq89z" -import React from "react" +import { Children, createElement } from "react" import { useForm } from "react-hook-form" export default function Form({ defaultValues, children, onSubmit }) { @@ -199,9 +198,9 @@ export default function Form({ defaultValues, children, onSubmit }) { return (