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

fix(plugin-proposal-object-rest-spread): use computed memberExpression for literal keys #11550

Merged
merged 2 commits into from May 12, 2020

Conversation

kitos
Copy link
Contributor

@kitos kitos commented May 12, 2020

use computed memberExpression for literal keys

currently plugin-proposal-object-rest-spread fails to compile this:

let {
  0: { firstName,...rest },
  1: setState,
} = useState();

which is a result of this optimization - perf(gatsby/babel): Optimize hook destructuring

Q                       A
Fixed Issues? ☝️
Patch: Bug Fix? Yes
Major: Breaking Change?
Minor: New Feature?
Tests Added + Pass? Yes
Documentation PR Link
Any Dependency Changes?
License MIT

@codesandbox-ci
Copy link

codesandbox-ci bot commented May 12, 2020

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit ba4525e:

Sandbox Source
xenodochial-benz-d2ls5 Configuration
recursing-cookies-k4b39 Configuration

@babel-bot
Copy link
Collaborator

babel-bot commented May 12, 2020

Build successful! You can test your changes in the REPL here: https://babeljs.io/repl/build/22091/

Co-authored-by: Huáng Jùnliàng <jlhwung@gmail.com>
@existentialism existentialism added the PR: Bug Fix 🐛 A type of pull request used for our changelog categories label May 12, 2020
@nicolo-ribaudo
Copy link
Member

Thanks!

@nicolo-ribaudo nicolo-ribaudo merged commit 9a52019 into babel:master May 12, 2020
@kitos kitos deleted the fix/nested-literal-spread branch May 13, 2020 07:40
@github-actions github-actions bot added the outdated A closed issue/PR that is archived due to age. Recommended to make a new issue label Aug 13, 2020
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 13, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
outdated A closed issue/PR that is archived due to age. Recommended to make a new issue PR: Bug Fix 🐛 A type of pull request used for our changelog categories
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants