calesce / redux-slider-monitor

A custom monitor for Redux DevTools to replay recorded Redux actions

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Update to Redux DevTools 3.0 Beta 2

gaearon opened this issue · comments

commented

Redux DevTools beta is out with breaking changes. For monitors, there are a few of them:

  • Instead of receiving action creators in props, you now get dispatch in props and have to import { ActionCreators } from 'redux-devtools' to get access to commit, rollback, etc
  • The action props are now indexed by ID, so instead of stagedActions and skippedActions you get actionsById, stagedActionIds and skippedActionIds. toggleAction() now accepts id instead of index. To grab vanilla action object by ID, use this.props.actionsById[id].action. The timestamp is also available on that action: this.props.actionsById[id].timestamp.
  • The monitor now has to export a reducer static property. For what it's worth, it could be a no-op function, but it must exist. In more interesting case, it will be (state, action, props) => nextState function where state is the monitor's own state available to it as monitorState prop. You are free to use it to let monitor react to any action and remember any data. This is why setMonitorState prop is gone.
  • Monitors shouldn't take care anymore of isVisible (hiding or showing themselves) or doing so on special key presses. We're moving towards a composable monitor model, where you'd use a special dock monitor to contain other monitor. Therefore monitors should only be worried about rendering themselves.

The diff of the default LogMonitor can serve as an inspiration for these changes.
You can try the new version of Redux DevTools on the next branch.

Please let me know if you find any issues. The API might change slightly in the final release, but this is pretty close, and it involves some work, so let me know if you need any help.

Done! Published as 1.0.0-beta-1 and will release 1.0 when DevTools 3.0 is officially out. I didn't run into many issues, except some styling I already needed to address.

commented

Thanks!

@calesce Thank you for such a great tool! I've already tried it before, but I'm unable to run examples from 1.0.0-beta-1 branch, here is my shell log and error Uncaught TypeError: _reactDom.findDOMNode is not a function. I believe its also related to #3

Looks like I forgot to update the Counter example to React 0.14 😨Sorry about that!

Just released 1.0.0 in conjunction with the DevTools 3.0.0 release.

cool, thanks @calesce