Introduction.jsx 562 Bytes
import React, { Component, Fragment } from 'react'
import IntroductionMd from './resources/md/IntroductionMd.md'
import ReactMarkdown from 'react-markdown'

export default class Introduction extends Component {
  state = {
    terms: null
  }

  componentDidMount() {
    fetch(IntroductionMd)
      .then(response => response.text())
      .then(text => {
        this.setState({ terms: text })
      })
  }
  render() {
    return (
      <Fragment>
        <ReactMarkdown source={this.state.terms} className={'markdown-body'} />
      </Fragment>
    )
  }
}