This repository accompanies the Bit React tutorial. It gives a hands-on demonstration with example code on how to share, use and update a component between two real-world React applications.
Go through the full step-by-step tutorial here: https://docs.bit.dev/docs/tutorials/bit-react-tutorial
Bit lets you share and sync components between different projects and applications.
In this tutorial, we'll share a React component between two projects.
This tutorial assumes that you are familiar with:
- Terminal and command line.
- Using node and npm or yarn.
- React development and React CRA, including editing React files in your favorite code editor.
- Git
You need to verify that you have:
- Node 8.12+
To run this tutorial, clone and setup the React tutorial project: https://github.com/teambit/bit-react-tutorial
git clone https://github.com/teambit/bit-react-tutorial
cd bit-react-tutorial
yarn
In this tutorial you will learn how to:
- Setup Bit
- Share a React component from an existing project
- Preview the exported component on the Bit cloud
- Install the component in another project
- Modify the React component on the new project
- Get component updates