xxxxxxxxxx
import React, {Component} from 'react'
import ReactDOM from 'react-dom'
xxxxxxxxxx
constructor(props) {
super(props)
this.state = { username: undefined }
}
xxxxxxxxxx
render () {
this.state.username
const { username } = this.state
···
}