November 2018
Beginner
502 pages
10h 22m
English
In this section, we'll consume the onSubmit form prop in the ContactUs component. The ContactUs component won't manage the submission—it will simply delegate to the ContactUsPage component to handle the submission:
import { Form, ISubmitResult, IValues, minLength, required } from "./Form";interface IProps { onSubmit: (values: IValues) => Promise<ISubmitResult>;}const ContactUs: React.SFC<IProps> = props => { ... }
const ContactUs: React.SFC<IProps> = props => { const handleSubmit = async (values: IValues): ...Read now
Unlock full access