/** @jsx React.DOM */ var React = require('react'); var CheckboxStore = require('../stores/CheckboxStore.js'); var NameThrower = React.createClass({ getInitialState: function () { return { name: '', colors: CheckboxStore.getColors() }; }, componentWillMount: function () { CheckboxStore.addChangeListener(this.update); }, componentWillUnmount: function () { CheckboxStore.removeChangeListener(this.update); }, update: function () { this.setState({ colors: CheckboxStore.getColors() }); }, updateName: function (event) { this.setState({ name: event.target.value }); }, renderColors: function (color, index) { var style = {color: color}; return