Edit on Github

useFluxible #

import { useFluxible } from 'fluxible-addons-react';

useFluxible is a React hook that returns the Fluxible component context.

Example #

const Component = () => {
    const { executeAction } = useFluxible();

    return <button onClick={() => executeAction(myAction)} />;
  }
}