Flummox
Guides
Quick Start
React Integration
Why FluxComponent > fluxMixin
API
Store
Flux
Actions
FluxComponent
Higher-order component
fluxMixin
GitHub

# Higher-order Flux Component

Requires React 0.13. If you’re still on React 0.12, use FluxComponent instead.

A higher-order component form of FluxComponent. Here’s an example from the Flummox documentation app:

    class HomeHandler extends React.Component {
      render() {
        const { doc } = this.props;

        if (!doc) return <span />;

        return <Doc doc={doc} />;
      }
    }

    HomeHandler = connectToStores(HomeHandler, {
      docs: store => ({
        doc: store.getDoc('index')
      })
    });

Note: FluxComponent, fluxMixin, and the higher-order component implement the same interface. Eventually the docs will updated to make this clearer.