All Projects → substack → React Starter

substack / React Starter

bare-bones react starter using reactify for jsx under browserify/watchify with npm run scripts

Programming Languages

javascript
184084 projects - #8 most used programming language

react-starter

bare-bones react starter using reactify for jsx under browserify/watchify with npm run scripts

view the starter demo

quick start

$ npm install
$ npm run watch &
$ npm start

commands

  • npm run build - build for production
  • npm run watch - automatically recompile during development
  • npm start - start a static development web server

starter code

var React = require('react')
var App = React.createClass({
  getInitialState: function () { return { n: 0 } },
  render: function () {
    return <div>
      <h1>clicked {this.state.n} times</h1>
      <button onClick={this.handleClick}>click me!</button>
    </div>
  },
  handleClick: function () {
    this.setState({ n: this.state.n + 1 })
  }
})
React.render(<App />, document.querySelector('#content'))

contributing

If you like what you see, but want to add something more, fork this repo and add your additional feature to the name of the fork. Try to be specific with the name of your fork, listing the technologies used plus what features the fork adds.

variations

Check out the list of forks to see how other people have customized this starter repo.

license

This software is released into the public domain.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].