Getting Started
Welcome! A good place to start with any React Native project is the dependency manager. It keeps your React Native dependencies up-to-date and healthy using automation which ties into your developer workflows.
This guide gets you off and running with the dependency manager. To begin, choose a package that uses React Native and open a terminal window.
If you want to learn more about this project before jumping in, head to the introduction page.
Start by adding the dependency manager to your package.
- Yarn
- pnpm
- npm
yarn add @rnx-kit/align-deps --dev
pnpm add -D @rnx-kit/align-deps
npm add --save-dev @rnx-kit/align-deps
Next, generate the dependency manager configuration for your package. If your
package produces a bundle, it's an app
. Otherwise, it's a library
.
- Yarn
- pnpm
- npm
yarn rnx-align-deps --init app
yarn rnx-align-deps --init library
pnpm rnx-align-deps --init app
pnpm rnx-align-deps --init library
npx rnx-align-deps --init app
npx rnx-align-deps --init library
Fix any React Native package versions that might have compatibility issues.
- Yarn
- pnpm
- npm
yarn rnx-align-deps --write
pnpm rnx-align-deps --write
npx rnx-align-deps --write
Review the changes. They should be limited to package.json and your Yarn / npm / pnpm lock file.
If any dependency versions changed, test your package to be sure everything is still in working order.
Congratulations! You can now automatically maintain your package as the React Native ecosystem grows and changes. Take a look at the dependency management guide to learn how.