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

"redux state" panels action send to FIRST store. #17

Open
uk-taniyama opened this issue Feb 2, 2021 · 1 comment
Open

"redux state" panels action send to FIRST store. #17

uk-taniyama opened this issue Feb 2, 2021 · 1 comment

Comments

@uk-taniyama
Copy link

If i want to display multiple stories with addon-docs, i need to create multiple stores.
BUT "redux state" panel action send to FIRST store.
So, i cannot use "redux state" panel.

withRedux.ts

  if (!initialized) {
    channel.on(events.SET_STATE, state => store.dispatch(setStateAction(state)))
    channel.on(events.DISPATCH, action => store.dispatch(action))
  }

  initialized = true
@uk-taniyama
Copy link
Author

i am using it with the following changes.

channel.removeAllListeners(events.SET_STATE);
channel.removeAllListeners(events.SET_STATE);
channel.on(events.SET_STATE, state => store.dispatch(setStateAction(state)))
channel.on(events.DISPATCH, action => store.dispatch(action))

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

1 participant