Skip to content
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

Wrong persistState session id? #18

Closed
peteruithoven opened this issue Nov 23, 2015 · 5 comments
Closed

Wrong persistState session id? #18

peteruithoven opened this issue Nov 23, 2015 · 5 comments

Comments

@peteruithoven
Copy link
Contributor

When using ...?debug_session=a for persistant state, the state is stored under the following key in localStorage:
redux-dev-session-?debug_session=a,a
This is because the whole String.match() result is used, instead of a specific group, see:
https://github.com/zalmoxisus/redux-devtools-extension/blob/master/src/app/store/configureStore.js#L9-L11
When debug_session is available, the second array item should be used as id.

@peteruithoven
Copy link
Contributor Author

Also see: reduxjs/redux-devtools#191

@zalmoxisus
Copy link
Owner

Hey @peteruithoven,

I thought it is the intended result, isn't it?
It's the same as in the docs and the redux-devtools' example get the same key. I do not see as well why we double the id, but it is better to discuss it on the redux-devtools repo.

@peteruithoven
Copy link
Contributor Author

We don't double it, String.match() just returns an array in which the first item is the whole match and in this case the second is the actual session id. I also opened an issue in the redux-devtools repo.

@zalmoxisus
Copy link
Owner

Got it. I saw your solution. If you make a pull request here, I'd merge it.

@zalmoxisus
Copy link
Owner

Thanks, @peteruithoven. I also removed redux-devtools-dock-monitor, so now we do not store unnecessary data like position, size and visibility. Probably, we could create a pull request to redux-devtools-log-monitor in order to make monitorState optional, so we could remove it at all from the stored object.

New version (0.4.3) should be updated automatically from Chrome store.

Also, I added a proposal (#20) to extending persistState. If you have some more suggestions, it's better to continue the discussion there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants