Перейти к содержимому

Build a React UI Library from scratch - TypeScript, Storybook, Jest & Rollup

Nick De Raj

0:00 / 0:00

Build a React UI Library from scratch - TypeScript, Storybook, Jest & Rollup

14 241 просмотр · 3 г. назад
Nick De Raj
650 подписчиков
14 241 просмотр · 3 г. назад
We're doing a deep dive into how to build a React UI Library from scratch in this video - building a simple Button with a variant prop and creating a "story" of it as well as tests. We also publish to NPM and import it directly into another project. If this helps, please drop a like and comment to let me know if you need me to cover anything else (or if you just wanna say hi!) ✌️ Code: https://nickderaj.com/youtube/react-u... Chapters: 00:00 - Introduction 00:30 - Initialise the NPM project 01:50 - Setting up TypeScript & what the settings mean 07:24 - Folder structure - why use index.ts? 10:34 - Setting up Rollup 15:12 - Publishing to NPM 17:52 - Importing the package in another project 19:14 - Customising our Button 22:25 - Adding postcss to Rollup 26:10 - Setting up Storybook 27:44 - Adding a Button.stories.ts file 30:07 - Adding react as a peer dependency 30:32 - Setting up tests with Jest 33:09 - Final deployment 33:55 - Outro & Thanks :)