redux_toolkit 0.1.4
redux_toolkit: ^0.1.4 copied to clipboard

Dart port of the official, opinionated, batteries-included toolset for efficient Redux development

example/lib/main.dart

import 'package:example/config.dart';
import 'package:example/modules/app_reducer.dart';
import 'package:example/modules/app_state.dart';
import 'package:example/my_app.dart';
import 'package:flutter/material.dart';
import 'package:redux_toolkit/redux_toolkit.dart';

Future main() async {
  WidgetsFlutterBinding.ensureInitialized();
  await Config.initialize();

  final store = await configureStore<AppState>((builder) {
    builder.withReducer(reducer);
    builder.withPreloadedState(AppState.initialState());

    if (Config.reduxDevtoolsEnabled) {
      builder.usingDevtools(Config.reduxDevtoolsUrl);
    }
  });

  runApp(MyApp(store));
}
2
likes
100
pub points
44%
popularity

Dart port of the official, opinionated, batteries-included toolset for efficient Redux development

Repository (GitHub)
View/report issues

Documentation

API reference

Uploader

xmr.nkr@gmail.com

License

MIT (LICENSE)

Dependencies

meta, redux, redux_dev_tools, redux_remote_devtools, redux_thunk, reselect

More

Packages that depend on redux_toolkit