import { connect } from "effector-react";
Deprecated

since effector-react 23.0.0.

Consider using hooks api in modern projects.

Wrapper for useUnit to use during migration from redux and class-based projects. Will merge store value fields to component props.

Methods

connect($store)(Component)

Formulae

connect($store: Store<T>)(Component): Component

Arguments

  1. $store (Store): store or object with stores

Returns

(Component) => Component: Function, which accepts react component and return component with store fields merged into props

connect(Component)($store)

Formulae

connect(Component)($store: Store<T>): Component

Arguments

  1. Component (React.ComponentType): react component

Returns

($store: Store<T>) => Component: Function, which accepts a store and returns component with store fields merged into props

Contributors