import React from 'react';
require('./../../public/main.css');

class Challenge extends React.Component {
  constructor(props) {
    super(props);
    this.state = {};
    console.log('props:',  props);
    // console.log(this.state)
    this.updateChallenge = this.updateChallenge.bind(this);
  }

  updateChallenge(e) {
    this.setState({
      challenge: e.target.value
    });
  }

  render() {
    return (
      <div>
        {this.props.chapter ? this.props.chapter[0].challengeText : null}
      </div>
    );
  }
}

export default Challenge;

import React from 'react';
require('./../../public/main.css');

class Challenge extends React.Component {
  constructor(props) {
    super(props);
    this.state = {};
  }

  render() {
    return (
      <div>
        <strong><p> Challenge Text </p></strong>
        <div dangerouslySetInnerHTML={{__html: this.props.chapter ? this.props.chapter[0].challengeText : null}} />
      </div>
    );
  }
}

export default Challenge;

Make html render on page from server
Make html render on page from server
