You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a wrapping component that accesses next/router for the purpose of registering some event listeners. When I use it as a decorator on my Stories, everything is fine (the @storybook/nextjs mocks kick in), but since the Docs add-on doesn't support decorators, when I use the same wrapping component in a custom container, I get an error (See Reproduction steps).
A path to a possible fix would be for the @storybook/next preset to expose the Providers that it uses for the decorators. These could imported in preview.tsx by consumers of the Docs add-on and passed to a custom container.
Needs nextjs and addon: docs labels.
The text was updated successfully, but these errors were encountered:
Describe the bug
I have a wrapping component that accesses
next/router
for the purpose of registering some event listeners. When I use it as adecorator
on my Stories, everything is fine (the@storybook/nextjs
mocks kick in), but since the Docs add-on doesn't support decorators, when I use the same wrapping component in a customcontainer
, I get an error (See Reproduction steps).Reproduction link
https://stackblitz.com/edit/github-bdxeif-nadeqm
Reproduction steps
Caution
NextRouter was not mounted. https://nextjs.org/docs/messages/next-router-not-mounted
System
Additional context
A path to a possible fix would be for the
@storybook/next
preset to expose theProvider
s that it uses for the decorators. These could imported inpreview.tsx
by consumers of the Docs add-on and passed to a customcontainer
.Needs
nextjs
andaddon: docs
labels.The text was updated successfully, but these errors were encountered: