<div id="app"></div>
class FirstComponent extends React.Component {
  render() {
    const isGoodWord = true
    const goodWord = <strong> is good</strong>
    const badWord = <strong> is not good</strong>
    return (
      <div>
        <h1>React 小书 { isGoodWord ? goodWord : badWord }</h1>
      </div>
    )
  }
}

ReactDOM.render(<FirstComponent />, document.getElementById('app'))
View Compiled

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

  1. https://cdnjs.cloudflare.com/ajax/libs/react/15.6.1/react.min.js
  2. https://cdnjs.cloudflare.com/ajax/libs/react/15.6.1/react-dom.min.js