Posts by Patrick Ooteman

Setup React + Typescript + Storybook all using the same SCSS

Posted on by  
Patrick Ooteman

So ok. You found out that React is super cool. Even more cool when you’re able to use Typescript AND storybook to showcase your reusable components! This article is a fantastic base to set it all up: https://dev.to/swyx/quick-guide-to-setup-your-react—​typescript-storybook-design-system-1c51 or use this github example: https://github.com/JoshSchreuder/storybook3-typescript-example . But I’m missing something here. I’d love to be able to use the scss files used in my app to style the components in storybook the same way. Searching through all the blogs and forums, it all seems to be kinda unclear how to do so. After tweaking some bits, adding webpack config to the storybook files and even (un)ejecting React, I found out adding your global scss style is fairly simple, even though it feels like you should’nt be using it like this. How? These are the steps:

Continue reading →

shadow-left