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

Components - Bring back Element Binding #4

Open
CLeeSpruit opened this issue Jan 5, 2020 · 1 comment
Open

Components - Bring back Element Binding #4

CLeeSpruit opened this issue Jan 5, 2020 · 1 comment
Labels

Comments

@CLeeSpruit
Copy link
Owner

Background
When converting over to TS -> JS, one major feature that was lost was element binding via the ElementDecorator.

This was intentionally dropped because JS does not have a great alternative to TS-esque decorators. They exist if you do tinkering with babel and polyfills, but it would also require the end user to install these.

Additionally, having to create a class variable with a decorator just to bind an element was not a perfect solution to begin with. Often these were manipulated in the class later on in the code, but not always and it'd be flagged by linters.

Workaround
Currently you can just use the old style of grabbing elements and binding events to them. It's a bit wordy though.

@CLeeSpruit
Copy link
Owner Author

Something of a "better" workaround was added with #12, but it'd be nice to have something similar to the old decorator binding or implement something in-template.

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

No branches or pull requests

1 participant