-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Extract LiftedState directly from the extension #618
Extract LiftedState directly from the extension #618
Comments
Adding liftedState to every monitor action would have performance cost as it has to be serialized everytime. Adding a way to request it from the extension if needed or specifying for what action to include it would be reasonable. For
We should probably handle For redux we have liftedState doubled on the client side in instrumentation). The reason we're keeping a copy is to implement hot-reloading even if the extension is not in use. When the extension is not in use (its window wasn't opened) for redux the extension doesn't store liftedState history, so we don't have perf waste on serialization if not needed. There's a way to use it without that only for logging. However for non-redux apps the recommendation is not to maintain a copy of liftedState as it would add extra complexity, especially if the state can be mutated. It should be directly available from the extension as you suggested. |
@zalmoxisus: thank you for a detailed explanation. Interesting, I actually don't send the liftedState from the start. I only send liftedState back on each So my questions are then following:
The options passed to extensions are the following: let options = ReduxDevTools.enhancerOptions(
~name="ReductiveTests",
~serialize=ReduxDevTools.serializeOptions(
~symbol=true,
/* ~replacer=Helpers.serializeWithRecordKeys, */
()
),
~features=ReduxDevTools.enhancerFeatures(
~pause=true,
~lock=true,
~persist=true,
~export=Obj.magic("custom"),
~import=Obj.magic("custom"),
~jump=true,
~skip=true,
~reorder=false,
~dispatch=true,
~test=true,
()
),
()
); |
@ambientlight I checked now, I see |
@zalmoxisus: that would be great, looking forward, thanks! Is it also possible to add liftedState inside |
@ambientlight sure, will add in case it will be supported in future on monitors side. |
@zalmoxisus: how's everything been going, just checking if this issue is still relevant here? |
I am writing an integration with reductive via communicating directly through connect API.
I am able to implement most of the monitor actions, except the actions that rely on liftedState:
SWEEP
REORDER_ACTIONS
LOCK_CHANGES
: lock-changes button will be only toggled onceisLocked
is set on liftedState.for now liftedState is only passed in
TOOGLE_ACTION
monitor action when skipping an action.It would be great if either there is some way to explicitly retrieve liftedState from the extension API, or maybe passing it in above-mentioned action's payload. Or maybe there is some hack for now?
I can have the corresponding liftedState on my side and update it accordingly on app and monitor actions but it feels like it should be directly available from the extension.
The text was updated successfully, but these errors were encountered: