November 2018
Beginner
502 pages
10h 22m
English
In this section, we'll start to create our form containing our first controlled input:
import * as React from "react";const ContactUs: React.SFC = () => { return ( <form className="form" noValidate={true}> <div className="form-group"> <label htmlFor="name">Your name</label> <input type="text" id="name" /> </div> </form> );};export default ContactUs;
This is a function component that renders a form containing a label and an input for the user's name.
.form { width: 300px; margin: 0px auto 0px auto;}.form-group { display: flex; flex-direction: ...Read now
Unlock full access