Created
November 24, 2018 00:50
-
-
Save evertonstrack/2093ab37be0e323f33a76a6f024482ac to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { Component } from 'react'; | |
export default class UserData extends Component { | |
constructor(){ | |
super(); | |
this.state = { | |
name: '' | |
}; | |
} | |
componentDidMount() { | |
this.setState({ | |
name: 'Jubileu' | |
}); | |
} | |
render() { | |
return ( | |
<div className="user-data"> | |
<h2>{this.state.name}</h2> | |
</div> | |
); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment