Thank you for contributing to React Library! This is a guide for successfully making changes to this repository.
- Node.js 18+
If it is your first time using Yarn 4, first run:
% corepack enable
Corepack is a tool shipped with Node.js 16+ that will automatically select the right package manager version to run depending on the project you're working on.
Then in the project root, install the dependencies:
react-library % yarn install
➤ YN0000: · Yarn 4.0.2
...
If corepack was enabled correctly, you should see Yarn version 4+ logged when you install.
Next, build the packages:
react-library % yarn dbuild
This will compile and build each package.
- Make a change to a package.
- Write unit tests for your change (see
[package]/src/__tests__
). - [Optional] If making a change to
components
, write a story for your change (seecomponents/src/__stories__
). - Make sure CI passes by running
yarn ci
in the project root. - Create a pull request against
main
with a description explaining the change. - Address feedback.
If you'd like to test a change to this repository against another project that uses one of the React Library packages as a dependency before the change is released, refer to the developer guide.