Skip to content

Commit 2c3c897

Browse files
[core] Increase React peer dependency to v16.8.0 (#14432)
1 parent 0a5916c commit 2c3c897

File tree

21 files changed

+309
-436
lines changed

21 files changed

+309
-436
lines changed

.size-limit.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ module.exports = [
8181
name: 'The main docs bundle',
8282
webpack: false,
8383
path: main.path,
84-
limit: '193 KB',
84+
limit: '194 KB',
8585
},
8686
{
8787
name: 'The docs home page',

docs/src/pages/css-in-js/basics/basics.md

-2
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,6 @@ npm install @material-ui/styles
3939
yarn add @material-ui/styles
4040
```
4141

42-
> Please note that it depends on *react@next* and *react-dom@next*.
43-
4442
### Migration for `@material-ui/core` users
4543

4644
To switch from the default style implementation to this newest version, you need to execute the following code **before importing any** Material-UI's components:

docs/src/pages/layout/use-media-query/use-media-query.md

-3
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,6 @@ title: Media queries in React for responsive design
66

77
<p class="description">This is a CSS media query hook for React. It listens for matches to a CSS media query. It allows the rendering of components based on whether the query matches or not.</p>
88

9-
> ⚠️ `useMediaQuery` is unstable as hooks aren't stable yet, therefore it is exported with an unstable prefix.
10-
Please note that it depends on *react@next* and *react-dom@next*.
11-
129
Some of the key features:
1310

1411
- ⚛️ It has an idiomatic React API.

examples/cdn-next/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ which is great for prototyping. We discourage using this approach in production
2222
the client has to download the entire library, regardless of which components are actually used,
2323
affecting performance and bandwidth utilisation.
2424

25-
[The live preview.](https://rawgit.com/mui-org/material-ui/master/examples/cdn/index.html)
25+
[The live preview.](https://rawgit.com/mui-org/material-ui/next/examples/cdn/index.html)
2626

2727
## UMD releases
2828

examples/cdn/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ which is great for prototyping. We discourage using this approach in production
2222
the client has to download the entire library, regardless of which components are actually used,
2323
affecting performance and bandwidth utilisation.
2424

25-
[The live preview.](https://rawgit.com/mui-org/material-ui/master/examples/cdn/index.html)
25+
[The live preview.](https://rawgit.com/mui-org/material-ui/next/examples/cdn/index.html)
2626

2727
## UMD releases
2828

package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -152,10 +152,10 @@
152152
"prettier": "^1.8.2",
153153
"puppeteer": "^1.5.0",
154154
"raw-loader": "^0.5.1",
155-
"react": "^16.8.0-alpha.1",
155+
"react": "^16.8.0",
156156
"react-autosuggest": "^9.3.2",
157157
"react-docgen": "^3.0.0",
158-
"react-dom": "^16.8.0-alpha.1",
158+
"react-dom": "^16.8.0",
159159
"react-draggable": "^3.0.5",
160160
"react-final-form": "^4.0.2",
161161
"react-frame-component": "^4.0.2",

packages/material-ui-benchmark/package.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,11 @@
2525
},
2626
"license": "MIT",
2727
"dependencies": {
28+
"@emotion/core": "^10.0.0",
29+
"@emotion/styled": "^10.0.0",
2830
"benchmark": "^2.1.4",
2931
"emotion-server": "^10.0.6",
3032
"nodemod": "^1.5.19",
31-
"styled-system": "^3.1.11",
32-
"@emotion/core": "^10.0.0",
33-
"@emotion/styled": "^10.0.0"
33+
"styled-system": "^3.1.11"
3434
}
3535
}

packages/material-ui-docs/package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@
3232
},
3333
"peerDependencies": {
3434
"@material-ui/core": "^3.0.0",
35-
"react": "^16.3.0",
36-
"react-dom": "^16.3.0"
35+
"react": "^16.8.0",
36+
"react-dom": "^16.8.0"
3737
},
3838
"dependencies": {
3939
"@babel/runtime": "^7.2.0",

packages/material-ui-icons/package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@
3737
},
3838
"peerDependencies": {
3939
"@material-ui/core": "^3.0.0",
40-
"react": "^16.3.0",
41-
"react-dom": "^16.3.0"
40+
"react": "^16.8.0",
41+
"react-dom": "^16.8.0"
4242
},
4343
"dependencies": {
4444
"@babel/runtime": "^7.2.0",

packages/material-ui-lab/package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@
3434
},
3535
"peerDependencies": {
3636
"@material-ui/core": "^3.0.0",
37-
"react": "^16.3.0",
38-
"react-dom": "^16.3.0"
37+
"react": "^16.8.0",
38+
"react-dom": "^16.8.0"
3939
},
4040
"dependencies": {
4141
"@babel/runtime": "^7.2.0",

packages/material-ui-lab/src/Slider/Slider.js

-5
Original file line numberDiff line numberDiff line change
@@ -217,11 +217,6 @@ function preventPageScrolling(event) {
217217
event.preventDefault();
218218
}
219219

220-
/* istanbul ignore if */
221-
if (process.env.NODE_ENV !== 'production' && !React.createContext) {
222-
throw new Error('Material-UI: [email protected] or greater is required.');
223-
}
224-
225220
/**
226221
* @param {number} rawValue
227222
* @param {object} props

packages/material-ui-styles/package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@
3333
"typescript": "tslint -p tsconfig.json \"{src,test}/**/*.{ts,tsx}\""
3434
},
3535
"peerDependencies": {
36-
"react": "^16.7.0-alpha.2",
37-
"react-dom": "^16.7.0-alpha.2"
36+
"react": "^16.8.0",
37+
"react-dom": "^16.8.0"
3838
},
3939
"dependencies": {
4040
"@babel/runtime": "^7.2.0",

packages/material-ui-system/package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@
3232
"test": "cd ../../ && cross-env NODE_ENV=test mocha 'packages/material-ui-system/**/*.test.js' --exclude '**/node_modules/**'"
3333
},
3434
"peerDependencies": {
35-
"react": "^16.3.0",
36-
"react-dom": "^16.3.0"
35+
"react": "^16.8.0",
36+
"react-dom": "^16.8.0"
3737
},
3838
"dependencies": {
3939
"@babel/runtime": "^7.2.0",

packages/material-ui-utils/package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@
3232
"test": "cd ../../ && cross-env NODE_ENV=test mocha 'packages/material-ui-utils/**/*.test.js' --exclude '**/node_modules/**'"
3333
},
3434
"peerDependencies": {
35-
"react": "^16.3.0",
36-
"react-dom": "^16.3.0"
35+
"react": "^16.8.0",
36+
"react-dom": "^16.8.0"
3737
},
3838
"dependencies": {
3939
"@babel/runtime": "^7.2.0",
+3-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"build/umd/material-ui.production.min.js": {
3-
"bundled": 867738,
4-
"minified": 320738,
5-
"gzipped": 84774
3+
"bundled": 868476,
4+
"minified": 321053,
5+
"gzipped": 84839
66
}
77
}

packages/material-ui/package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@
3232
"typescript": "tslint -p tsconfig.json \"{src,test}/**/*.{ts,tsx}\""
3333
},
3434
"peerDependencies": {
35-
"react": "^16.3.0",
36-
"react-dom": "^16.3.0"
35+
"react": "^16.8.0",
36+
"react-dom": "^16.8.0"
3737
},
3838
"dependencies": {
3939
"@babel/runtime": "^7.2.0",

packages/material-ui/src/ButtonBase/ButtonBase.js

-5
Original file line numberDiff line numberDiff line change
@@ -48,11 +48,6 @@ export const styles = {
4848
focusVisible: {},
4949
};
5050

51-
/* istanbul ignore if */
52-
if (process.env.NODE_ENV !== 'production' && !React.createContext) {
53-
throw new Error('Material-UI: [email protected] or greater is required.');
54-
}
55-
5651
/**
5752
* `ButtonBase` contains as few styles as possible.
5853
* It aims to be a simple building block for creating a button.

packages/material-ui/src/Modal/Modal.js

-5
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,6 @@ export const styles = theme => ({
3838
},
3939
});
4040

41-
/* istanbul ignore if */
42-
if (process.env.NODE_ENV !== 'production' && !React.createContext) {
43-
throw new Error('Material-UI: [email protected] or greater is required.');
44-
}
45-
4641
/**
4742
* Modal is a lower-level construct that is leveraged by the following components:
4843
*

packages/material-ui/src/Snackbar/Snackbar.js

-5
Original file line numberDiff line numberDiff line change
@@ -94,11 +94,6 @@ export const styles = theme => {
9494
};
9595
};
9696

97-
/* istanbul ignore if */
98-
if (process.env.NODE_ENV !== 'production' && !React.createContext) {
99-
throw new Error('Material-UI: [email protected] or greater is required.');
100-
}
101-
10297
class Snackbar extends React.Component {
10398
state = {};
10499

packages/material-ui/src/SwipeableDrawer/SwipeableDrawer.js

-5
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,6 @@ export function reset() {
2525
nodeThatClaimedTheSwipe = null;
2626
}
2727

28-
/* istanbul ignore if */
29-
if (process.env.NODE_ENV !== 'production' && !React.createContext) {
30-
throw new Error('Material-UI: [email protected] or greater is required.');
31-
}
32-
3328
class SwipeableDrawer extends React.Component {
3429
state = {};
3530

0 commit comments

Comments
 (0)