Skip to content

Instantly share code, notes, and snippets.

@evertonstrack
Created November 24, 2018 00:50
Show Gist options
  • Save evertonstrack/2093ab37be0e323f33a76a6f024482ac to your computer and use it in GitHub Desktop.
Save evertonstrack/2093ab37be0e323f33a76a6f024482ac to your computer and use it in GitHub Desktop.
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