- Clone this repository:
git clone https://github.com/pmndrs/react-spring
cd react-spring-
Install
yarn(https://yarnpkg.com/en/docs/install) -
Bootstrap the packages:
yarn
# Clone the docs (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-springto 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-appusers: Follow this guide: facebook/react#13991 (comment) -
For
webpackusers: Add an alias towebpack.config.jslike this:alias: { react: path.resolve('node_modules/react'), }
-
For
gatsbyusers: Installgatsby-plugin-alias-importsand add this to yourgatsby-config.jsmodule:{ resolve: `gatsby-plugin-alias-imports`, options: { alias: { react: path.resolve('node_modules/react'), }, }, },
To publish a new version:
yarn release major | minor | patch --tag