atlassian-labs / storybook-addon-performance

🚧 A storybook addon to help better understand and debug performance for React components.
https://storybook-addon-performance.netlify.com
Other
652 stars 32 forks source link

Error: NextRouter was not mounted. Storybook 7.0.9, NextJS 13.1.4 #144

Open dacgray opened 1 year ago

dacgray commented 1 year ago

We set up storybook with these instructions: https://storybook.js.org/blog/get-started-with-storybook-and-next-js/

In these versions we set router parameters with:

const parameters = {
    nextjs: {
        router: {
            route: '/my-route',
            path: '/my-route',
            asPath: '/my-route',
            locale: 'en-GB',
        },
    },
}

const getStory = (handler: FooHandler): Story => {
    return {
        parameters,
        ...

We get Error: NextRouter was not mounted

router.js:121

corymsmith commented 1 year ago

Any ideas on how to resolve this?