You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We try to stick to the namespace import of react via import React from 'react'; and then always use member access when using hooks i.e. const [labelWidth, setLabelWidth] = React.useState(0);.
This has poor minifaction potential (usually member access can't get mangled) and combined with array destructuring this blows up quite a bit:
Did some earlier testing (eps1lon#6) and reductions seemed promising. Since we have now a bigger sample size of hooks usage patterns it would be nice if someone investigates the build changes introduced by this plugin. A branch that includes the build in version control and a diff that shows all the build changes would be nice.
The text was updated successfully, but these errors were encountered:
This issue has been closed. If you have a similar problem but not exactly the same, please open a new issue.
Now, if you have additional information related to this issue or things that could help future readers, feel free to leave a comment.
We try to stick to the namespace import of react via
import React from 'react';
and then always use member access when using hooks i.e.const [labelWidth, setLabelWidth] = React.useState(0);
.This has poor minifaction potential (usually member access can't get mangled) and combined with array destructuring this blows up quite a bit:
Facebook recently released
babel-plugin-optimize-react
which addresses these issues. The PR that would include this intoreact-scripts
is still open.Did some earlier testing (eps1lon#6) and reductions seemed promising. Since we have now a bigger sample size of hooks usage patterns it would be nice if someone investigates the build changes introduced by this plugin. A branch that includes the build in version control and a diff that shows all the build changes would be nice.
The text was updated successfully, but these errors were encountered: