Designing the setup form

First, we have the Setup Account button. This one should show users a form with several inputs to set up their name, age, and state, where only the name is mandatory. There should be a Cancel button as well as a Submit button. Let's create a new React component that we'll call Form, which will include all these requirements:

class Form extends React.Component {    constructor() {        super()    }    render() {        return (            <form className={this.props.className}>                <input type="text" ref="form-name" placeholder="Your name" />                <input type="number" ref="form-age" placeholder="Your age" />                <textarea ref="form-state" placeholder="Your state, a description about yourself"></textarea>                <div>                    <button>Cancel</button> <button>Submit</button>  ...

Get Mastering Ethereum now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.