Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[core] Remove redundant class field initializers, save 1% of bundle size #13022

Conversation

RobertPurcea
Copy link
Contributor

There are several components where assignments in the constructor overwrite class fields assignments making them redundant.

@oliviertassinari oliviertassinari changed the title Remove redundant class field initializers [core] Remove redundant class field initializers Sep 27, 2018
@oliviertassinari oliviertassinari self-assigned this Sep 27, 2018
@oliviertassinari
Copy link
Member

oliviertassinari commented Sep 27, 2018

I'm gonna be way more greedy 😈, I'm pushing this pull request further.

@oliviertassinari oliviertassinari force-pushed the remove-reduntant-null-init-in-class-fields branch from 394e58d to d3c0dcf Compare September 27, 2018 18:46
@@ -22,13 +22,13 @@ module.exports = [
name: 'The size of all the modules of material-ui.',
webpack: true,
path: 'packages/material-ui/build/index.js',
limit: '92.4 KB',
limit: '91.4 KB',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The best part, 1% reduction 😎

@oliviertassinari oliviertassinari merged commit 8995f08 into mui:master Sep 27, 2018
@oliviertassinari
Copy link
Member

@RobertPurcea Thank you! 🚀

@oliviertassinari oliviertassinari changed the title [core] Remove redundant class field initializers [core] Remove redundant class field initializers, save 1% of bundle size Sep 27, 2018
marcelpanse pushed a commit to marcelpanse/material-ui that referenced this pull request Oct 2, 2018
* remove redundant class field initializers, if they are overwritten in constructor

* bundle size\!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants