JSFiddle - React, Tailwind, and code Playground
HTML
<script src="http://fb.me/react-with-addons-0.12.0.js"></script>
<script src="http://fb.me/JSXTransformer-0.12.0.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/lodash.js/3.3.1/lodash.js"></script>
<script src="https://rawgit.com/JedWatson/react-select/master/dist/react-select.js"></script>
<link rel="stylesheet" href="https://rawgit.com/JedWatson/react-select/master/dist/default.css">
<script src="http://fb.me/react-js-fiddle-integration.js"></script>
JavaScript 1.7
var Hello = React.createClass({
componentDidMount: function(){
setTimeout(function(){
this.setState({
options: [
{ value: "one", label: "foo label" },
{ value: "two", label: "two label" }
]
});
}.bind(this), 3000);
},
getInitialState: function(){
return {
options: [],
selected: "two"
};
},
render: function() {
return <Select options={this.state.options} value={this.state.selected} searchable={false} />;
}
});
React.render(<Hello name="World" />, document.body);