React wrapper for Chosen jQuery.
bower install react-chosen
Or simply drop the script somewhere on your page (after React and Chosen of course):
The npm build works, but unfortunately not well:
npm install react-chosen
Due to the awkwardness of Chosen and jQuery on npm, you'll still have to include jQuery as a global dependency. Installing via npm is not recommended.
Please refer to Chosen's API. It's pretty much the same, except:
Every Chosen option employs camelCase, e.g. disable_search_threshold -> disableSearchThreshold.
Just like React's controlled component,
value controls your select and makes it immune to changes unless you specify so.
/** @jsx React.DOM */React.renderComponent(Harvest, document.body);// or multi-selectReact.renderComponent(AppleHarvest, document.body);