MichaelMarner / dart-redux-remote-devtools

Remote Devtools for Dart & Flutter
https://pub.dartlang.org/packages/redux_remote_devtools
MIT License
53 stars 10 forks source link

Dispatch actions received from remote devtools #10

Closed MichaelMarner closed 5 years ago

MichaelMarner commented 5 years ago

Closes #7

coveralls commented 5 years ago

Pull Request Test Coverage Report for Build 72


Changes Missing Coverage Covered Lines Changed/Added Lines %
lib/src/remote_devtools_middleware.dart 10 12 83.33%
<!-- Total: 13 15 86.67% -->
Totals Coverage Status
Change from base Build 63: -1.5%
Covered Lines: 74
Relevant Lines: 81

💛 - Coveralls
MichaelMarner commented 5 years ago

This is working for me now, have fixed the outstanding issues and tests

kadza commented 5 years ago

I was able to test it. Good news is that it works, but the flow isn't as straight forward as it could be. As I remember from the web dev (I might be wrong), I could copy the action from the raw view and dispatch the payload.

In this case, in the action raw view, there is:

{
  type: 'SelectSpotAction',
  payload: {
    spotId: '3'
  }
}

and if I want to dispatch it, I have to convert it to:

{"type": "SelectSpotAction", "spotId": "3"}

MichaelMarner commented 5 years ago

Just tested on an Angular + NGRX web project and Redux DevTools, and it looks like that is just how the raw view displays the action:

screen shot 2019-01-11 at 11 49 08 am
MichaelMarner commented 5 years ago

There is an open issue for this on the devtools extension:

https://github.com/zalmoxisus/redux-devtools-extension/issues/504

Right now you can Export the state from Devtools, which gives you a JSON representation of all the actions received, which can then be dispatched by copy/pasting into Devtools.

I think this is good to merge, and we can circle back to reduce friction in actually deploying actions from Devtools