How to use the effector-react.createStoreConsumer function in effector-react

To help you get started, we’ve selected a few effector-react examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github today- / effector-react-inject / src / index.tsx View on Github external
export function inject(
    stores: {[key in K]: Store},
): any {
    const merged = createStoreObject(stores);
    const Consumer = createStoreConsumer(merged);

    return (
        Cmp: React.ComponentType,
    ) => (props: Props & {[key in K]: typeof stores[key]}) => (
        
            {state => }
        
    );
}