material-ui v4.0.0-alpha.0 Release Notes

  • 💥 Breaking Changes

    • [core] Increase React peer dependency to v16.8.0 (#14432) @oliviertassinari

    The upgrade path to React 16.8.0 should be pretty easy for our users. Introducing this breaking change in v4 enables the following:

    • We can remove the recompose dependency and use the new React.memo() API.
    • Before or after v4 is out, we can gradually migrate the core components to use the Hook API.

      • [Grid] Use a unitless spacing API (#14099) @ifndefdeadmau5

    🚚 In order to support arbitrary spacing values and to remove the need to mentally count by 8, we are changing the spacing API:

      /**
       * Defines the space between the type `item` component.
       * It can only be used on a type `container` component.
       */
    -  spacing: PropTypes.oneOf([0, 8, 16, 24, 32, 40]),
    +  spacing: PropTypes.oneOf([0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]),
    

    💻 Going forward, you can use the theme to implement a custom Grid spacing transformation function: https://material-ui.com/system/spacing/#transformation.

    • [theme] Make theme.palette.augmentColor() pure (#13899) @ryancogswell

    The theme.palette.augmentColor() method no longer performs a side effect on its input color. In order to use it correctly, you have to use the output of this function.

    -const background = { main: color };
    -theme.palette.augmentColor(background);
    +const background = theme.palette.augmentColor({ main: color });
    
    console.log({ background });
    
    • [core] Change UMD output name to 'MaterialUI' (#13142) @tkrotoff

    This change eases the use of Material-UI with a CDN:

      const {
        Button,
        TextField,
      -} = window['material-ui'];
      +} = MaterialUI;
    

    It's consistent with the other projects:

    • material-ui => MaterialUI
    • react-dom => ReactDOM
    • prop-types => PropTypes

      • 💅 [Button] Remove deprecated props and styles (#14383) @mbrookes

    ✂ Remove the deprecated button flat, raised and fab variants:

    -<Button variant="raised" />
    +<Button variant="contained" />
    
    -<Button variant="flat" />
    +<Button variant="text" />
    
    -import Button from '@material-ui/core/Button';
    -<Button variant="fab" />
    +import Fab from '@material-ui/core/Fab';
    +<Fab />
    
    • 👍 [core] Drop official node 6 support (#14379) @eps1lon