Skip to content

Commit d22f809

Browse files
paycorchauhanSaurabh Chauhan
andauthored
fix(install): Adding react 17 to peer dependencies (dowjones#487)
With NPM 7 peer dependencies are automatically installed unlike previous versions. Since React 17 was not defined as a peer dependency the install of package failed on projects using Npm7 + React 17. React 17 support dowjones#486 Co-authored-by: Saurabh Chauhan <Sau072219@paycor.com>
1 parent 2212020 commit d22f809

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ Visit [unpkg.com](https://unpkg.com/#/) to see other options.
128128

129129
### Peer Dependencies
130130

131-
In order to avoid version conflicts in your project, you must specify and install [react](https://www.npmjs.com/package/react), [react-dom](https://www.npmjs.com/package/react-dom) as [peer dependencies](https://nodejs.org/en/blog/npm/peer-dependencies/). Note that NPM doesn't install peer dependencies automatically. Instead it will show you a warning message with instructions on how to install them.
131+
In order to avoid version conflicts in your project, you must specify and install [react](https://www.npmjs.com/package/react), [react-dom](https://www.npmjs.com/package/react-dom) as [peer dependencies](https://nodejs.org/en/blog/npm/peer-dependencies/). Note that NPM(version 4-6) doesn't install peer dependencies automatically. Instead it will show you a warning message with instructions on how to install them. If using Npm 7.X.X version, peer dependencies will be installed automatically.
132132

133133
If you're using the UMD builds, you'd also need to install the peer dependencies in your application:
134134

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@
117117
"why-did-you-update": "^0.1.1"
118118
},
119119
"peerDependencies": {
120-
"react": "^16.0.0"
120+
"react": "^16.0.0 || ^17"
121121
},
122122
"ava": {
123123
"files": [

0 commit comments

Comments
 (0)