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

Possible to "spread" props #3

Open
andregoldstein opened this issue Aug 18, 2022 · 2 comments
Open

Possible to "spread" props #3

andregoldstein opened this issue Aug 18, 2022 · 2 comments
Labels
blocked enhancement New feature or request

Comments

@andregoldstein
Copy link

Just wondering if it would be possible to spread the props that are received in the tag as per the use in the other adapters so it could be used as follows:

prop name = ""
prop items = []
...

instead of

prop props
...
def render
  const { name, items } = props
@haikyuu
Copy link
Owner

haikyuu commented Aug 19, 2022

We could if imba/imba#280 drops in Imba

@andregoldstein
Copy link
Author

Thanks, yep I guess it's one of the few use cases. It would be a much nicer DX to be able to declare each prop individually and to set a sensible default value (although you can do similar in your destructured example inside the render)

@haikyuu haikyuu added enhancement New feature or request blocked labels Aug 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocked enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants