Next.js Discord

Discord Forum

Next storybook router

Unanswered
Pink salmon posted this in #help-forum
Open in Discord
Pink salmonOP
Hi folks, I've added the storybook nextjs addon (https://www.npmjs.com/package/@storybook/nextjs) to to my project and none of the links in my components work anymore when rendered out in storybook. I'll call router.push(/some-link) and the usePathname from next/navigation doesn't get updated. Any ideas how to fix this? Here's a snapsot from the meta for one of my component's story's that aren't working:
parameters: {
        nextjs: {
            appDirectory: true,
            navigation: {
                pathname: "/",
            },
        },
    },

1 Reply

Pink salmonOP
Bump. It's impossible to test my components or interact with them in storybook with this routing not working.