docs/dist/flummox/data/docs/api/higher-order-component.json
{"path":"api/higher-order-component","content":"Higher-order Flux Component\n===========================\n\n**Requires React 0.13. If you're still on React 0.12, use FluxComponent instead.**\n\nA higher-order component form of [FluxComponent](fluxcomponent.md). Here's an example from the [Flummox documentation app](https://github.com/acdlite/flummox/blob/master/docs/src/shared/components/HomeHandler.js#L15-L19):\n\n```js\nclass HomeHandler extends React.Component {\n render() {\n const { doc } = this.props;\n\n if (!doc) return <span />;\n\n return <Doc doc={doc} />;\n }\n}\n\nHomeHandler = connectToStores(HomeHandler, {\n docs: store => ({\n doc: store.getDoc('index')\n })\n});\n```\n\n**Note**: FluxComponent, fluxMixin, and the higher-order component implement the same [interface](https://github.com/acdlite/flummox/blob/master/src/addons/reactComponentMethods.js). Eventually the docs will updated to make this clearer.\n"}