Now that you have Yarn installed, you can start using Yarn. Here are some of the most common commands you’ll need.
Starting a new project
Adding a dependency
yarn add [package] yarn add [package]@[version] yarn add [package]@[tag]
Adding a dependency to different categories of dependencies
yarn add [package] --dev yarn add [package] --peer yarn add [package] --optional
Upgrading a dependency
yarn upgrade [package] yarn upgrade [package]@[version] yarn upgrade [package]@[tag]
Removing a dependency
yarn remove [package]
Installing all the dependencies of project
The Yarn Workflow
How do I use Yarn? There are basic workflows for both creating and consuming Yarn packages that will help you get productive quickly.
Yarn is executed through a rich set of commands allowing package installation, administration, publishing, and more.