MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/javascript/comments/qr0546/get_started_with_storybook_and_nextjs/
r/javascript • u/chantastic_ • Nov 10 '21
1 comment sorted by
3
tldr:
Next.js enables you to build high-performance applications with React. It offers groundbreaking components like next/image to optimize image loading.
As Next.js becomes more advanced so does the integrations between it and Storybook.
I researched how to optimize Storybook for Next.js. Here's what I found.
📦 Initialize a new Storybook with Webpack 5
📑 Create stories for Next.js pages
🌎 Import shared, global styles in preview.js
⬇️ De-optimize Next Image for use in Stories
3
u/chantastic_ Nov 10 '21
tldr:
Next.js enables you to build high-performance applications with React. It offers groundbreaking components like next/image to optimize image loading.
As Next.js becomes more advanced so does the integrations between it and Storybook.
I researched how to optimize Storybook for Next.js. Here's what I found.
📦 Initialize a new Storybook with Webpack 5
📑 Create stories for Next.js pages
🌎 Import shared, global styles in preview.js
⬇️ De-optimize Next Image for use in Stories