Skip to content

Using an instanceId #144

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

Closed
3cooper opened this issue Jun 21, 2016 · 4 comments
Closed

Using an instanceId #144

3cooper opened this issue Jun 21, 2016 · 4 comments
Labels

Comments

@3cooper
Copy link

3cooper commented Jun 21, 2016

I'm using version 2.0.1. I calling the store like this:

  oStore = Redux.createStore(
    oReducer,
    oInitialStore,
    document.cookie.indexOf('redux-debug') > -1 &&  window.devToolsExtension ? window.devToolsExtension({ name: 'MyName', instanceId: Math.floor(Date.now() / 1000).toString()}) : f => f
  );

I have this again for another component with MyName2. MyName component loads first and I can see its information devtools. Once I load a second component with MyName2, the data in the inspector for MyName is replaced by the data for MyName2. I can select between both stores but the data is the same. Am I doing something wrong?

@zalmoxisus
Copy link
Owner

zalmoxisus commented Jun 21, 2016

@3cooper, by default it autoselect the instance. If you want to see the information for specific instance, you should select it explicitly
rext
Selecting the instance is not present in Chrome DevTools panel for now, so you should open devtools in a window (click the first button on the bottom).

BTW, instanceId by default already should have a random value, so no need to specify it there.

@3cooper
Copy link
Author

3cooper commented Jun 21, 2016

I did open devtools in a window. I have also now removed the instanceId. I see both my instances in the menu but when i switch between them they are the same. When it loads I see my first instance and it has many actions logged. Then I click a button that loads another component onto the page. When that new component loads I can see both instances in the devtools window but when I switch between them they contain the same information which is the INIT action for the most recently added store. It seems to have lost the information that was previously in there for the first store and overwritten it with the new one.

@zalmoxisus zalmoxisus added the bug label Jun 22, 2016
@zalmoxisus
Copy link
Owner

Sorry, I messed it here. I need to find another solution for #133 to roll it back.

@zalmoxisus
Copy link
Owner

Fixed in v2.1.0.

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

No branches or pull requests

2 participants