react-starter-es6

0.0.1 • Public • Published

react-starter-es6

build status js-standard-style

bare-bones react es6 starter using reactify for jsx using babelify for Babel under browserify/watchify with npm run scripts with browserSync for live reload with standard for linting

view the starter demo

quick start

$ npm install
$ npm run dev

commands

  • npm run build - build for production
  • npm run dev - start dev server with auto realod and automatically recompile during development
  • npm start - start a static development web server
  • npm test - code style revision and test

starter code

import React from 'react'

class App extends React.Component {
  constructor (props) {
    super()
    this.state = props
  }
  handleClick () {
    this.setState({
      n: this.state.n + 1
    })
  }
  render () {
    return (<div>
      <h1>clicked {this.state.n} times</h1>
      <button onClick={this.handleClick.bind(this)}>click me!</button>
    </div>)
  }
}

App.propTypes = { n: React.PropTypes.number }
App.defaultProps = { n: 1}

React.render(<App />, document.querySelector('#content'))

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.0.1
    0
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.0.1
    0

Package Sidebar

Install

npm i react-starter-es6

Weekly Downloads

0

Version

0.0.1

License

MIT

Last publish

Collaborators

  • h02e56