Releases of Material-UI v4 with CSS precision, boilerplate classes, Angular migration, and more

Last week, the team behind Material-UI with CSS precision, migration to Typescript and much more. The release of Material-UI v4 is influenced by two major factors. Firstly, the team done in March. Secondly, the team wanted to be up to date with the latest best practices in the React community and with the Material Design Specification.

What has changed in Material-UI v4?

CSS precision

CSS precision needs to be good enough and by default, Material-UI injects its style at the end of the element. But styled components and few other popular styling solutions inject the style just before it and therefore loses specificity. In order to solve this problem, the team has introduced a new prop: injectFirst.

Courses are boilerplate

In v1, the team had introduced classes API to target all the elements but they observed the use of this API for sometime and saw few users struggling. It is challenging to apply the class name on the right element and it further requires boilerplate as well. In order to improve this situation, the team changed the class name generation to and kept the classes API working as before.

TypeScript

All videos have been converted from Script to TypeScript. The group also double-checked their demos, increasing the scope of their Angular test coverage. Additionally, they fixed a lot of bugs during the movement. Users can now directly copy and paste the videos without having to convert them or correct the errors when writing an software using Oop.

For FREE, you can get Tech’s largest indie learning library.

Getting unrestricted access to 7500+ eBooks and video courses that are written by experts and cover every technical topic you can think of.

Renews at$ 19.99/month. Cancel at any time.

Increased user experience

The group has changed the menu structure to place every component under a single navigational product. In order to improve the accessibility and comparison of the text, the team also changed the background color to light.

Tree squab using ES units

People can now use destructured imports when importing several components because this is the second version that supports local branch shaking with ES modules.

Check out the <a href="https://medium.com/material-ui/material-ui-v4-is-out-4b7587d1e701″ target=”_blank” rel=”noopener noreferrer”>post on Medium to learn more about this transfer.

Leave a Comment