Open sibelius opened 8 years ago
Hi there, Is there any progress? may be i can help? should i try something from scratch?
@guipasmoi, thanks for bringing it up.
This issue was addressing 2 questions:
The first one is already fixed by clicking Lock
button. As per the latter, I plan both to monitor effects along with actions and to integrate redux-saga-devtools
. There are 2 issues there:
maxAge
for actions, otherwise it would just freeze the app at some point.If you'd like to help solving those 2 issues on redux-saga-devtools
, it would be much welcome. The second one is breaking the integration the most.
@zalmoxisus would u like to get any help with integrating redux-saga-devtools
? Would love to help in pushing this project forward, although im focused at the moment on reaching v1 with redux-saga and do not have much time, always glad to help though.
@Andarist thanks for chiming in! I'm also busy right now with Redux DevTools Extension 3.0 release, then will try to get back to it.
In order to integrate redux-saga-devtools
in remotedev-app
(redux-devtools-extension
/ react-native-debugger
) or to release it as a separate extension, we need assigning a unique id to actions inside redux-saga
. We could keep the references while stringifing but it would require to serialize all the data on every new effect, which would be under performant.
When I have time Ill surely would like to reach you and chat on some chat how could we approach this. Gr8 opportunity for the users (and for me in terms of learning :) ). Hope to wrap up this v1 some time in following weeks
Is there something i didn't understood correctly ?
We want to have an identifier on every redux action. To be able to associate redux devtools with redux saga-devtools
why are we not using a middleware and doing something like that.
let i = 0;
const ActionIdentifier = new Symbol("ActionIdentifier")
const actionIdentifierMiddleware = store => next => action => {
if (action[ActionIdentifier] == undefined) {
i++;
action[ActionIdentifier] = i++;
}
return next(action)
}
const monitor = createSagaMonitor()
const sagaMiddleware = createSagaMiddleware({ sagaMonitor: monitor })
const store = createStore(
rootReducer,
applyMiddleware(actionIdentifierMiddleware, sagaMiddleware)
)
sagaMiddleware.run(rootSaga)
@guijesuis we're already storing actions indexes in Redux Devtools enhancer. The problem is how to associate those indexes with effects (not every action triggers an effect and an action can trigger multiple effects).
Currently, in Saga DevTools they are just compared as reference, which is lost after serialization. See redux-saga-devtools/src/store/selectors.js#L72 and the related issue.
I see you mean to pollute the action object. It could be a solution, but still better to be implemented on redux-saga
part. Also note that Symbol is unserializable and invokes the same issue as comparing objects by reference.
There shouldn't be any problems with it. I've used both of them here, though there's an earlier version of
remote-redux-devtools
andredux-saga
.Of course,
sagaMonitor
is not part ofremote-redux-devtools
, so you still have to look in the console for it.