storybook: The api setQueryParams not working

Describe the bug The method api.setQueryParams not working

To Reproduce

addons.register("storybook/something", (api) => {
  api.setQueryParams({abc: "hello"});
});

Expected behavior expect api.getQueryParam(“abc”) to be “hello”

Screenshots Screen Shot 2019-10-29 at 11 58 34 AM

Code snippets Screen Shot 2019-10-29 at 11 57 30 AM

System:

"@storybook/addons": "^5.2.0",
"@storybook/react": "^5.2.0",

Additional context The addon was not working with api.setQueryParams and api.getQueryParam any more https://github.com/echoulen/storybook-addon-styled-component-theme

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Reactions: 1
  • Comments: 15 (11 by maintainers)

Most upvoted comments

I would like to be able to set the URL for sharing purposes. Right now I am unable to do anything to the URL as an addon as it is always cleared