#Next.js 13 integration with Storybook not working

7 messages · Page 1 of 1 (latest)

rose sluice
#

Hello there! We currently have an earlier version of Nextjs integrating with Storybook really well, allowing us to import our reusable components as promised.

We were hoping we'd be able to achieve the same integration with Next13 by just using client side components but this does not seem to be working. The only solutions we found were to wrap each imported storybook component in separate wrappers with "use client" at the top of the file. But this is not practical with the amount of component's we have..

Any suggestions (if its currently possible) to have all our component's client components by default without doing it the way mentioned above? 😊

worldly thistle
#

use pages folder instead

rose sluice
#

What if some of the components end up needing the server-side-component functionality?

worldly thistle
#

if you are using getServerSideProps, the page is server side rendering like the previous version of next does

#

the app directory is experimental feature with nested layout and react server component

north cedar
#

v7.0.0-alpha.52 seems to work much better with Next

#

didn't had to do anything special to get it working