Overview:
The react-library-template, previously known as Storybook TypeScript React Component Library, is a solution for sharing react hooks, components, and utilities across teams or personal projects. This library utilizes Storybook, eliminating the need for webpack and create-react-app. It allows for component development in isolation and can be published to a github page for stakeholders to view. It comes preconfigured with TypeScript, react-testing-library, Jest, and ESLint.
Features:
- Share hooks, components, and utilities: This library allows for easy sharing of react hooks, components, and utilities with your team or across personal projects.
- Utilizes Storybook: By utilizing Storybook, component development can be done in isolation, bypassing the need for webpack and create-react-app.
- Publish to github page: Components developed using this library can be published to a github page, allowing stakeholders to view and provide feedback.
Installation:
To install the react-library-template, perform the following steps:
- Clone the template repo by clicking “Use this template”.
- Rename the cloned repo to your preferred name (e.g., my-company-react-library) and clone it locally.
- Rename the
package.jsonnamefield to match your desired name. - Add any additional dependencies you may need.
- Remove any unnecessary parts of the README.
- Run the project using the provided scripts.
If you want to develop with this library in another project, follow these steps:
- Run
npm run build:watchin this project. - In your other project, run
npm link ../react-library-template, replacing the folder name with your repo’s name. - Start your other project and you will have access to the compiled code as you write it!
Summary:
The react-library-template is a solution for sharing react hooks, components, and utilities. It utilizes Storybook for component development in isolation, eliminating the need for webpack and create-react-app. It can be published to a github page for stakeholder feedback. The library comes preconfigured with TypeScript, react-testing-library, Jest, and ESLint.