- Clone this repository:
git clone https://github.com/react-spring/react-spring -b v9
cd react-spring
-
Install
yarn
(https://yarnpkg.com/en/docs/install) -
Bootstrap the packages:
yarn
# Clone the docs and examples (optional)
yarn meta git update
- Link the packages:
# Use the .js bundles
yarn lerna exec 'cd dist && yarn link || exit 0'
# Or use the uncompiled .ts packages
yarn lerna exec 'yarn link'
- Link
react-spring
to your project:
cd ~/my-project
yarn link react-spring
- Let's get cooking! 👨🏻🍳🥓
Be sure your commit messages follow this specification: https://www.conventionalcommits.org/en/v1.0.0-beta.4/
React 16.8+ has global state to support its "hooks" feature, so you need to ensure only one copy of react
exists in your program. Otherwise, you'll most likely see this error. Please try the following solutions, and let us know if it still doesn't work for you.
-
For
create-react-app
users: Follow this guide: facebook/react#13991 (comment) -
For
webpack
users: Add an alias towebpack.config.js
like this:alias: { react: path.resolve('node_modules/react'), }
-
For
gatsby
users: Installgatsby-plugin-alias-imports
and add this to yourgatsby-config.js
module:{ resolve: `gatsby-plugin-alias-imports`, options: { alias: { react: path.resolve('node_modules/react'), }, }, },
To publish a new version:
yarn release
To publish a canary version:
yarn release --canary