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

EditableList's attribute-based approach makes for a confusing example #66

Open
justinfagnani opened this issue Oct 25, 2023 · 1 comment

Comments

@justinfagnani
Copy link

Taking list items as individual items is a pretty awkward API that people are using as an example of why web components have a bad API. It's a poor argument - you can make a similar component API in any framework - but there's no reason IMO to design a component this way. It would be far more ergonomic to take a list of items as a property, a JSON array as an attributes, and/or a list of child elements.

@bsmth
Copy link
Member

bsmth commented Mar 18, 2024

Thanks for reporting. Is the suggestion to do something like this?

<editable-list
    title="TODO"
    items='["one", "two", "three"]'
    ...
></editable-list>

To help anyone reading through / investigating:

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

2 participants