Skip to content
This repository has been archived by the owner on Apr 22, 2020. It is now read-only.

Latest commit

 

History

History
40 lines (34 loc) · 758 Bytes

README.md

File metadata and controls

40 lines (34 loc) · 758 Bytes

Build Status

Usage

ReduxProvider usage:

runApp(ReduxProvider(
	store: new Store(
      createReducer(),
      State(),
      StateActions(),
    ),
	child: child,
));

useReduxActions usage:

HookBuilder(
  builder: (context) {
    MyActions actions = useReduxActions<MyActions>();

    return RaisedButton(
        onPressed: () => actions.someAction(),
        child: new Text('dispatch action'),
    ),
  },
)

useReduxActions usage:

HookBuilder(
  builder: (context) {
    SubState sub = useReduxState<State, SubState>((s) => s.sub);
    return Text(sub.textProp);
  },
)