BlackWaspTech/redux-wasp

Add a logger or debug option to redux-wasp's custom middleware

Opened this issue · 0 comments

redux-wasp has several moving pieces, and, right now, it's rather difficult to determine if an issue is arising from a user mistake or from our library.

Adding some sort of debugger, logger, or even just internal state reporting would go a long way to helping to resolve this problem.

Currently, createWaspMiddleware takes just one property: automate

// store.js
import { createWaspMiddleware } from 'redux-wasp';

const waspMiddleware = createWaspMiddleware({ automate: false });

const store = createStore(r, ps, applyMiddleware(waspMiddleware));

This issue requires:

  • Determining a proper debugging tool

  • Adding another property to the middleware's config object (e.g. { logger: true})

  • Update the name of the automate.js file to be more generic, and to have it hold multiple configuration properties, not just automate

  • Update the methods that are reading and writing to this file

  • Update the unit tests

  • Update the docs