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

class and classNames are possibly redundant #352

Closed
mehulkar opened this issue Aug 14, 2018 · 2 comments
Closed

class and classNames are possibly redundant #352

mehulkar opened this issue Aug 14, 2018 · 2 comments

Comments

@mehulkar
Copy link
Contributor

To append classes to a component's HTML, you can do a few things:

  1. Add classNames: [] property to the JS
  2. Pass in classNames = 'a b' when invoking the component
  3. Pass in class = 'a b' when invoking the component

Considering that setting class: [] in JS is not valid, I think 2 and 3 should be consolidated. My personal preference would be to deprecate/remove the third option.

@rwjblue
Copy link
Member

rwjblue commented Aug 31, 2018

I agree with you in general, but it is very unlikely that we would make changes here. Instead we would prefer folks migrate to alternative component implementations (which was unlocked by #213) like sparkles-component (largely a demo of the feature added in #213) or the future @glimmer/component interop.

@rwjblue
Copy link
Member

rwjblue commented Dec 7, 2018

Considering that we are actively pushing towards a "glimmer component" RFC (and already allow custom component managers and base classes via public APIs) making a change like this would likely introduce more churn for folks that ends up "feeling" like busy work when a better path would be to migrate towards one of the newer / simpler component types to begin with...

@rwjblue rwjblue closed this as completed Dec 7, 2018
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