This project was bootstrapped with Create React App.
- https://docs.bit.dev/docs/tutorials/bit-react-tutorial
- https://docs.bit.dev/docs/react-guidelines
- https://bit.dev/bit/envs/compilers/react-typescript
- https://docs.bit.dev/docs/ts-guidelines
bit init --package-manager yarn
bit login
bit import bit.envs/compilers/react-typescript --compiler
Add to package.json:
{
"peerDependencies": {
"react": "^16.9.0",
"react-dom": "^16.9.0"
}
}
bit add src/components/Button
bit tag button
bit export
bit tag button # or: bit tag --all
bit export
yarn add @bit/<username>.test.button
- Install component via "yarn add @bit/.test.button"
- Import component:
bit init --package-manager yarn
bit import <username>.test/button
- Modify code
- Export normally (via bit tag & bit export)
bit import
bit checkout latest --all