onChange = key => e => {
const value = key.split('.').reduceRight(
(v, k) => ({
[k]: v,
}),
{
$set: e.target.value,
},
);
this.setState({
data: update(this.state.data, value),
});
};