How to write stories in TypeScript?

Varun Vachhar
Storybook
Published in
Sent as a

Newsletter

2 min readAug 4, 2022

You use hundreds of components to build your app. Each has its own props, class names and event handlers. It’s impossible to keep that all in your mind when coding. TypeScript makes that process easier.

Your code editor runs type checks to catch errors, and you get better autocomplete, saving significant time and effort. That’s why teams at Microsoft, Github, and Codecademy use TypeScript in their Storybook workflow.

But how do you write stories with TypeScript?

This article dives into typing stories. It covers all the basics of Storybook utility types and best practices that make your stories more robust.

Continue reading »

We’re hiring!
Join the team behind Storybook and Chromatic. Build tools that are used in production by 100s of thousands of developers. Remote-first. View openings »

Sneak Peek Storybook 7.0 Design
Last week we shared a sneak peek of Storybook 7.0’s new design. It refreshes our core UI patterns with subtle visual refinements, UX tweaks, and faster load times. Read the full post »

--

--