React Components Library

Gisela Difini
July 14th, 2020 · 1 min read

Hi! Just wanted to share this repo that I’ve created with typescript, styled-components, storybook, and react testing library for starting new react components library.

Github Repository

https://github.com/GiselaMD/react-lib-components

Generating New Components

There is a file under utils called create-component.js to help creating new components:

Component auto creation

Instead of copy pasting components, you can instead run this command to generate all the files you need to start building out a new component. To use it, just run:

1npm run generate ComponentName

Then you’ll have this component structure:

1/src
2 /ComponentName
3 ComponentName.tsx
4 ComponentName.stories.tsx
5 ComponentName.test.tsx
6 ComponentName.types.ts
7 ComponentName.styles.ts

👋🏻

More articles from Gisela Miranda Difini