Closed MichaelMarner closed 5 years ago
Changes Missing Coverage | Covered Lines | Changed/Added Lines | % | ||
---|---|---|---|---|---|
lib/src/remote_devtools_middleware.dart | 10 | 12 | 83.33% | ||
<!-- | Total: | 13 | 15 | 86.67% | --> |
Totals | |
---|---|
Change from base Build 63: | -1.5% |
Covered Lines: | 74 |
Relevant Lines: | 81 |
This is working for me now, have fixed the outstanding issues and tests
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"}
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:
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
Adds a new ActionDecoder class, that is responsible for converting JSON objects from remote devtools into action objects suitable for your reducers
Provides a simple NOP/Passthrough decoder that simply lets the JSON payload through
Allows app developers to create their own ActionDecoders that know how to decode actions they are interested in
Closes #7