diff --git a/.size-limit.js b/.size-limit.js
index 9f4e7638edb07c..0e27eb31ae496f 100644
--- a/.size-limit.js
+++ b/.size-limit.js
@@ -28,7 +28,7 @@ module.exports = [
name: 'The size of the @material-ui/core modules',
webpack: true,
path: 'packages/material-ui/build/index.js',
- limit: '92.4 KB',
+ limit: '91.9 KB',
},
{
name: 'The theme object',
@@ -40,7 +40,7 @@ module.exports = [
name: 'The size of the @material-ui/styles modules',
webpack: true,
path: 'packages/material-ui-styles/build/index.js',
- limit: '16.4 KB',
+ limit: '16.3 KB',
},
{
name: 'The size of the @material-ui/system modules',
@@ -87,7 +87,7 @@ module.exports = [
name: 'The main docs bundle',
webpack: false,
path: main.path,
- limit: '194 KB',
+ limit: '193 KB',
},
{
name: 'The docs home page',
diff --git a/docs/src/pages/demos/menus/RenderPropsMenu.js b/docs/src/pages/demos/menus/RenderPropsMenu.js
deleted file mode 100644
index 95c949e506a341..00000000000000
--- a/docs/src/pages/demos/menus/RenderPropsMenu.js
+++ /dev/null
@@ -1,42 +0,0 @@
-import React from 'react';
-import Button from '@material-ui/core/Button';
-import Menu from '@material-ui/core/Menu';
-import MenuItem from '@material-ui/core/MenuItem';
-import toRenderProps from 'recompose/toRenderProps';
-import withState from 'recompose/withState';
-
-const WithState = toRenderProps(withState('anchorEl', 'updateAnchorEl', null));
-
-function RenderPropsMenu() {
- return (
-
- {({ anchorEl, updateAnchorEl }) => {
- const open = Boolean(anchorEl);
- const handleClose = () => {
- updateAnchorEl(null);
- };
-
- return (
-
-
-
-
- );
- }}
-
- );
-}
-
-export default RenderPropsMenu;
diff --git a/docs/src/pages/demos/menus/menus.md b/docs/src/pages/demos/menus/menus.md
index e5b987593af1c7..a6493326bf8135 100644
--- a/docs/src/pages/demos/menus/menus.md
+++ b/docs/src/pages/demos/menus/menus.md
@@ -55,13 +55,6 @@ If the height of a menu prevents all menu items from being displayed, the menu c
{{"demo": "pages/demos/menus/LongMenu.js"}}
-## Render Props
-
-It is a [render props](https://reactjs.org/docs/render-props.html) demo that
-keeps track of the local state for a single menu.
-
-{{"demo": "pages/demos/menus/RenderPropsMenu.js"}}
-
## Limitations
There is [a flexbox bug](https://bugs.chromium.org/p/chromium/issues/detail?id=327437) that prevents `text-overflow: ellipsis` from working in a flexbox layout.
diff --git a/docs/src/pages/layout/breakpoints/RenderPropsWithWidth.js b/docs/src/pages/layout/breakpoints/RenderPropsWithWidth.js
deleted file mode 100644
index d624c449c63773..00000000000000
--- a/docs/src/pages/layout/breakpoints/RenderPropsWithWidth.js
+++ /dev/null
@@ -1,16 +0,0 @@
-import React from 'react';
-import withWidth from '@material-ui/core/withWidth';
-import Typography from '@material-ui/core/Typography';
-import toRenderProps from 'recompose/toRenderProps';
-
-const WithWidth = toRenderProps(withWidth());
-
-function RenderPropsWithWidth() {
- return (
-
- {({ width }) => Current width: {width}}
-
- );
-}
-
-export default RenderPropsWithWidth;
diff --git a/docs/src/pages/layout/breakpoints/breakpoints.md b/docs/src/pages/layout/breakpoints/breakpoints.md
index 5637e5128cd3f4..bfb3f6cec3613f 100644
--- a/docs/src/pages/layout/breakpoints/breakpoints.md
+++ b/docs/src/pages/layout/breakpoints/breakpoints.md
@@ -78,28 +78,6 @@ In the following demo, we change the rendered DOM element (*em*, u, ~~del
{{"demo": "pages/layout/breakpoints/WithWidth.js"}}
-#### Render Props
-
-In some cases, you can experience property name collisions using higher-order components.
-To avoid this, you can use the [render props](https://reactjs.org/docs/render-props.html) pattern shown in the following demo.
-
-```jsx
-import Typography from '@material-ui/core/Typography';
-import toRenderProps from 'recompose/toRenderProps';
-
-const WithWidth = toRenderProps(withWidth());
-
-export default function MyComponent() {
- return (
-
- {({ width }) => {`Current width: ${width}`}
}
-
- );
-}
-```
-
-{{"demo": "pages/layout/breakpoints/RenderPropsWithWidth.js"}}
-
## API
### `theme.breakpoints.up(key) => media query`
diff --git a/docs/src/pages/premium-themes/onepirate/modules/views/AppFooter.js b/docs/src/pages/premium-themes/onepirate/modules/views/AppFooter.js
index 0616de52b0b8f2..382a6541aa25a7 100644
--- a/docs/src/pages/premium-themes/onepirate/modules/views/AppFooter.js
+++ b/docs/src/pages/premium-themes/onepirate/modules/views/AppFooter.js
@@ -1,6 +1,5 @@
import React from 'react';
import PropTypes from 'prop-types';
-import pure from 'recompose/pure';
import { withStyles } from '@material-ui/core/styles';
import Grid from '@material-ui/core/Grid';
import Link from '@material-ui/core/Link';
@@ -152,6 +151,6 @@ AppFooter.propTypes = {
};
export default compose(
- pure,
+ React.memo,
withStyles(styles),
)(AppFooter);
diff --git a/docs/src/pages/utils/popover/RenderPropsPopover.js b/docs/src/pages/utils/popover/RenderPropsPopover.js
deleted file mode 100644
index 305484cd6446b2..00000000000000
--- a/docs/src/pages/utils/popover/RenderPropsPopover.js
+++ /dev/null
@@ -1,66 +0,0 @@
-import React from 'react';
-import PropTypes from 'prop-types';
-import { withStyles } from '@material-ui/core/styles';
-import Typography from '@material-ui/core/Typography';
-import Button from '@material-ui/core/Button';
-import Popover from '@material-ui/core/Popover';
-import toRenderProps from 'recompose/toRenderProps';
-import withState from 'recompose/withState';
-
-const WithState = toRenderProps(withState('anchorEl', 'updateAnchorEl', null));
-
-const styles = theme => ({
- typography: {
- margin: theme.spacing(2),
- },
-});
-
-function RenderPropsPopover(props) {
- const { classes } = props;
-
- return (
-
- {({ anchorEl, updateAnchorEl }) => {
- const open = Boolean(anchorEl);
- return (
-
-
- {
- updateAnchorEl(null);
- }}
- anchorOrigin={{
- vertical: 'bottom',
- horizontal: 'center',
- }}
- transformOrigin={{
- vertical: 'top',
- horizontal: 'center',
- }}
- >
- The content of the Popover.
-
-
- );
- }}
-
- );
-}
-
-RenderPropsPopover.propTypes = {
- classes: PropTypes.object.isRequired,
-};
-
-export default withStyles(styles)(RenderPropsPopover);
diff --git a/docs/src/pages/utils/popover/SimplePopover.hooks.js b/docs/src/pages/utils/popover/SimplePopover.hooks.js
new file mode 100644
index 00000000000000..63c68fa5384b42
--- /dev/null
+++ b/docs/src/pages/utils/popover/SimplePopover.hooks.js
@@ -0,0 +1,53 @@
+import React from 'react';
+import { makeStyles } from '@material-ui/styles';
+import Popover from '@material-ui/core/Popover';
+import Typography from '@material-ui/core/Typography';
+import Button from '@material-ui/core/Button';
+
+const useStyles = makeStyles(theme => ({
+ typography: {
+ padding: theme.spacing(2),
+ },
+}));
+
+function SimplePopover() {
+ const classes = useStyles();
+ const [anchorEl, setAnchorEl] = React.useState(null);
+
+ function handleClick(event) {
+ setAnchorEl(event.currentTarget);
+ }
+
+ function handleClose() {
+ setAnchorEl(null);
+ }
+
+ const open = Boolean(anchorEl);
+ const id = open ? 'simple-popover' : null;
+
+ return (
+
+
+
+ The content of the Popover.
+
+
+ );
+}
+
+export default SimplePopover;
diff --git a/docs/src/pages/utils/popover/SimplePopover.js b/docs/src/pages/utils/popover/SimplePopover.js
index e05089bc6437e7..9bb6fbba2cd531 100644
--- a/docs/src/pages/utils/popover/SimplePopover.js
+++ b/docs/src/pages/utils/popover/SimplePopover.js
@@ -36,7 +36,7 @@ class SimplePopover extends React.Component {
return (