Fix componentwillmount
This commit is contained in:
parent
430a53bbd9
commit
7c5c6f5d98
1 changed files with 2 additions and 5 deletions
|
@ -4,12 +4,9 @@ import ReactMarkdown from 'react-markdown';
|
|||
import AboutMarkdown from '../static/about.md';
|
||||
|
||||
class About extends React.Component {
|
||||
constructor () {
|
||||
super();
|
||||
this.state = { about: '' };
|
||||
}
|
||||
state = { about: '' };
|
||||
|
||||
componentWillMount() {
|
||||
componentDidMount() {
|
||||
fetch(AboutMarkdown).then(res => res.text()).then(text => this.setState({ markdown: text }));
|
||||
}
|
||||
|
||||
|
|
Reference in a new issue