redux_dev_tools 0.4.0

  • README.md
  • CHANGELOG.md
  • Installing
  • Versions
  • 75

redux_dev_tools

Build Status codecov

A Redux Store with a Delorean.

This library allows you to create a DevToolsStore during dev mode in place of a normal Redux Store. This DevToolsStore will act exactly like a normal Store at first, with one catch: It will allow you to travel back and forth throughout the State of your application!

You can write your own UI to travel in time, or use one of the existing options for the platform you're working with:

Demo

Flutter

A simple Flutter app that allows you to Increment and Decrement a counter.

A screenshot of the Dev Tools in Action

Usage

// Start by creating a simple Reducer, or a complex one. Dealer's choice. :)
int addOneReducer(int state, action) => state + 1;

// For production mode, this is how you should create your Store.
final store = new Store(addReducer, initialState: 0);

// In Dev Mode, however, if you want to hook up to Time-Traveling 
// Dev Tools, create a `DevToolsStore` instead!
//
// It will act exactly like your normal Store, but give you super powers
// to travel back and forth in time throughout your app States!
// 
// Remember: By itself this will beef up your Store, but will not provide
// a UI to Time Travel. See the libraries listed above to learn how to
// connect your Redux store to a UI! 
final store = new DevToolsStore(addReducer, initialState: 0);

Credits

All of this code was directly inspired by the original Redux Devtools.

Changelog

0.4.0

  • Fix Dart 2 environment constraint

0.3.0

  • Dart 2 / Redux 3.0.0 Support

0.2.0

  • Bump version of Redux and add distinct option to DevToolsStore

0.1.4

  • Don't advance position on recompute

0.1.3

  • Fix Type signature for Middleware

0.1.2

  • Move to Github

0.1.1

  • Update README

0.1.0

  • Initial version. Allows you to create a DevToolsStore during dev mode, which will allow you to time travel through the states of your application.

1. Depend on it

Add this to your package's pubspec.yaml file:


dependencies:
  redux_dev_tools: "^0.4.0"

2. Install it

You can install packages from the command line:

with pub:


$ pub get

with Flutter:


$ flutter packages get

Alternatively, your editor might support pub get or packages get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:


import 'package:redux_dev_tools/redux_dev_tools.dart';
        
Version Uploaded Documentation Archive
0.4.0 Apr 1, 2018 Go to the documentation of redux_dev_tools 0.4.0 Download redux_dev_tools 0.4.0 archive
0.3.0 Apr 1, 2018 Go to the documentation of redux_dev_tools 0.3.0 Download redux_dev_tools 0.3.0 archive
0.2.0 Dec 22, 2017 Go to the documentation of redux_dev_tools 0.2.0 Download redux_dev_tools 0.2.0 archive
0.1.4 Dec 15, 2017 Go to the documentation of redux_dev_tools 0.1.4 Download redux_dev_tools 0.1.4 archive
0.1.3 Dec 14, 2017 Go to the documentation of redux_dev_tools 0.1.3 Download redux_dev_tools 0.1.3 archive
0.1.2 Nov 25, 2017 Go to the documentation of redux_dev_tools 0.1.2 Download redux_dev_tools 0.1.2 archive
0.1.1 Aug 28, 2017 Go to the documentation of redux_dev_tools 0.1.1 Download redux_dev_tools 0.1.1 archive

Analysis

We analyzed this package on Apr 23, 2018, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.0.0-dev.49.0
  • pana: 0.10.6

Scores

Popularity:
Describes how popular the package is relative to other packages. [more]
51 / 100
Health:
Code health derived from static analysis. [more]
99 / 100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
100 / 100
Overall score:
Weighted score of the above. [more]
75
Learn more about scoring.

Platforms

Detected platforms: Flutter, web, other

No platform restriction found in primary library package:redux_dev_tools/redux_dev_tools.dart.

Suggestions

  • The description is too short.

    Add more detail about the package, what it does and what is its target use case. Try to write at least 60 characters.

  • Package is pre-v1 release.

    While there is nothing inherently wrong with versions of 0.*.*, it usually means that the author is still experimenting with the general direction API.

  • Maintain an example.

    Create a short demo in the example/ directory to show how to use this package. Common file name patterns include: main.dart, example.dart or you could also use redux_dev_tools.dart.

  • Fix analysis and formatting issues.

    Analysis or formatting checks reported 2 hints.

    Run dartfmt to format lib/src/reducer.dart.

    Run dartfmt to format lib/src/store.dart.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.0.0-dev.28.0 <3.0.0
redux >=3.0.0 <4.0.0 3.0.0
Dev dependencies
test >=0.12.33 <0.13.0