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

Feature Request: Use Destructuring in Output #1

Open
developit opened this issue Oct 2, 2019 · 1 comment
Open

Feature Request: Use Destructuring in Output #1

developit opened this issue Oct 2, 2019 · 1 comment
Labels
enhancement New feature or request

Comments

@developit
Copy link

It'd be nice if the generated function used object destructuring instead of local variable declarators:

export default (tag, { a, b, c } = {}) =>
  tag`${a}${b}{c}`;
@luwes luwes added the enhancement New feature or request label Oct 2, 2019
@luwes
Copy link
Owner

luwes commented Oct 2, 2019

I'm all for the conciseness, only downside would be that it might require an extra Babel plugin and the propsName option was to have support for object keys that include a dash. { 'full-name': 'John Snow' } and then in the template one could still do props['full-name'].

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

No branches or pull requests

2 participants