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

consider using object destructuring to avoid repetition #52

Open
ZooeyMiller opened this issue Dec 8, 2017 · 0 comments
Open

consider using object destructuring to avoid repetition #52

ZooeyMiller opened this issue Dec 8, 2017 · 0 comments

Comments

@ZooeyMiller
Copy link

ZooeyMiller commented Dec 8, 2017

I'll use your signUpHandler function as an example, you write allTheData.gitterhandle 4 times in this function, and allTheData.password a couple more times.

In order to avoid writing allTheData repeatedly, you can use object destructuring.

You can use this in multiple places in your app to avoid unnecessary repetition.

You can find an example in this repl: https://repl.it/@zooeyxmiller/destructuring-example

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant