diff --git a/src/components/About.js b/src/components/About.js index 1f562b4..2559515 100644 --- a/src/components/About.js +++ b/src/components/About.js @@ -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 })); }