mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
In #1287 i implemented basic handling for destructuring in DCE: if any of the pattern values are used, we retained the whole instruction as-is. However, ideally we could prune out unused elements from the pattern. There are pretty simple rules: * ArrayPattern we can eliminate unused elements from the end. * ObjectPattern we can eliminate any unused element, but only if there is no rest element.