1
0
Fork 0

Fix componentwillmount

This commit is contained in:
Amarpreet Minhas 2019-10-16 19:04:33 -04:00
parent 430a53bbd9
commit 7c5c6f5d98

View file

@ -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 }));
}