content: /* @flow weak */
  import {LiveGenerator} from '../app/LiveGenerator'
  
  type PropTypes = {
    itemName: String;
  }
  
  export class ReactComponent extends LiveGenerator {
  
    static namespace = 'live';
  
    props:PropTypes;
    className: string;
    componentFilePath: string;
  
    constructor(props, env) {
      super(...arguments)
    }
  
    async prompting() {
      this.npmInstall('react')
    }
  
    async init() {
  
      const {itemName} = this.props
      this.className = this.pascalCase(itemName)
      const fileName = this.fileName(this.className)
      const fileType = 'component'
  
      this.componentFilePath = this._.flowRight(
        this.destPath, this.srcDir, this.envDir('client'), this.fileTypeDir(fileType))(fileName)
  
      //if (this.props.main) {
      //} else {
      //}
  
    }
  
    async writing() {
      await this.render()
    }
  
    async render() {
  
      await this.init()
  
      const locals = {
        className: this.className,
      }
      this.fs.write(this.componentFilePath, this.template(locals, tmpl))
  
    }
  
  }
  
  ////////////////////////////////////////////////////////////////////////////////
  
  const tmpl = /* language=EJS */ `
  import React from 'react'
  
  export class <%- className %> extends React.Component {
  
    render() {
      return (
        <div>Hi!</div>
      )
    }
  
  }
  `
  
  