React hook, which takes any unit or shape of units.
In the case of events/effects - bind to current scope to use in dom event handlers.
effector-react/scope version works this way,
effector-react is no-op for events and does not require
Provider with scope.
useUnit introduced in effector-react 22.1.0
(Function): Function to pass to event handlers. Will trigger given unit in current scope
Current value of the store.
(Object or Array):
- if event or effect: functions with the same names or keys as argument to pass to event handlers. Will trigger given unit in current scope Note: events or effects will be bound only if
useUnitis imported from
- if store: current value of the store.