scopeAction<LocalAction> method
Store<S, LocalAction>
scopeAction<LocalAction>({
- required A toGlobalAction(
- LocalAction localAction
Creates a scoped store that transforms only the action type, keeping the same state.
This is a convenience wrapper around scope for cases where state does not need to be projected.
Implementation
Store<S, LocalAction> scopeAction<LocalAction>({
required A Function(LocalAction localAction) toGlobalAction,
}) =>
scope(
toLocalState: (globalState) => globalState,
toGlobalAction: toGlobalAction,
);