To create a ReactComponent
:
ReactComponent React.createClass(object proto)
Basic JSX example:
var TitleComponent = React.createClass({
// REQUIRED
// jshint node:true, latedef:nofunc | |
'use strict'; | |
var flo = require('fb-flo'), | |
gulp = require('gulp'), | |
path = require('path'), | |
map = require('map-stream'), | |
minimatch = require('minimatch'), | |
lazypipe = require('lazypipe'), | |
rimraf = require('rimraf'), |
x="" | |
b=r=>`${c||"No more"} bottle${c-1?"s":""} of beer${r&&c--||" on the wall"} | |
` | |
for(c=99;c;)x+=b()+b(1)+`Take one down, pass it around | |
`+b() |