title: React without npm
body: <p>How to import js file with code on Babel if i'm not using npm? I'm write my own server on Golang and serving html and js files.</p>
  
  <p>index.html</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html lang="en"&gt;
  &lt;head&gt;
      &lt;meta charset="UTF-8"&gt;
      &lt;title&gt;TODO APP&lt;/title&gt;
  &lt;/head&gt;
  &lt;body&gt;
      &lt;div id="root"&gt;&lt;/div&gt;
      &lt;script src="https://unpkg.com/react@16/umd/react.development.js" crossorigin&gt;&lt;/script&gt;
      &lt;script src="https://unpkg.com/react-dom@16/umd/react-dom.development.js" crossorigin&gt;&lt;/script&gt;
      &lt;script src="https://unpkg.com/babel-standalone@6/babel.min.js"&gt;&lt;/script&gt;
  
      &lt;script type='text/babel' src="./js/App.js"&gt;&lt;/script&gt;
      &lt;script type='text/babel' src="./js/Info.js"&gt;&lt;/script&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>App.js</p>
  
  <pre><code>class App extends React.Component {
    render(){
      return(
        &lt;div&gt;
          &lt;span onClick={() =&gt; {alert('clicked')}}&gt;{Date.now().toString()}&lt;/span&gt;
          &lt;Info /&gt;
        &lt;/div&gt;
      )
    }
  }
  
  ReactDOM.render(&lt;App /&gt;, document.getElementById('root'))
  </code></pre>
  
  <p>Info.js</p>
  
  <pre><code>export default class Info extends React.Component {
      constructor(props) {
          super(props);
          this.state = {
              isOpen: true,
          };
          this.handleClick = this.handleClick.bind(this);
      }
      render() {
          const text = &lt;label htmlFor="new-text"&gt;{this.state.isOpen ? 'Open' : "Closed"}&lt;/label&gt;
          return (
              &lt;div&gt;
                  &lt;button onClick={this.handleClick}&gt;
                      {text}
                  &lt;/button&gt;
              &lt;/div&gt;
          )
      }
      handleClick(e) {
          this.setState({
              isOpen: !this.state.isOpen,
          })
      }
  }
  </code></pre>
  
  <p>So i didn't know how to add Info to App. <strong>import didn't work</strong> cause i'm not using npm.</p>