Skip to content
This repository has been archived by the owner on Jan 25, 2022. It is now read-only.

destruct objects with alias #64

Open
FL0RIANMEYER opened this issue Jul 12, 2018 · 2 comments
Open

destruct objects with alias #64

FL0RIANMEYER opened this issue Jul 12, 2018 · 2 comments

Comments

@FL0RIANMEYER
Copy link

FL0RIANMEYER commented Jul 12, 2018

const { name, Tags as tags } = this.state;

avoids using:

const values = {
    name,
    tags: Tags,
};

or

const tag = Tag;
const values = {
    name,
    tags,
};
@hax
Copy link
Member

hax commented Jul 13, 2018

There is alias syntax:

const { name, Tags: tags } = this.state;

@adrianheine
Copy link
Contributor

I think this can be closed.

ghost referenced this issue Jul 9, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants