1.0.4 • Published 2 years ago
react-unpin v1.0.4
react-unpin
Unpin your framework's React version to install it locally
This helps to avoid breaking changes between React Canaries used by your framework and other tools, such as when using Server Components in tests, docs, or monorepo packages.
API Docs
Usage
unpin [path]react-unpin [path]By default, unpin and react-unpin will print the React version pinned in the current directory's package. You can optionally provide a single path to check a different directory's package. The React version pinned by Server Component frameworks typically starts with 18.3.0-canary-.
Zero Install
npx react-unpin@latestyarn dlx react-unpinpnpm dlx react-unpinbun x react-unpinLocal Install
Installing react-unpin locally isn't necessary unless you want to use it in a library or script.
npm install react-unpinyarn add react-unpinpnpm add react-unpinbun add react-unpinCaveats
- Only Next app router is supported currently since Next has the strongest support for Server Components and its pages router doesn't pin React. #9 #10
- A
node_modulesdirectory is required to resolve local Next installations, therefore Yarn PnP is unsupported. #2 - Internet access is required to read Next's source code since its package manifests exclude pinned React versions. #11