-
Notifications
You must be signed in to change notification settings - Fork 107
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
Timeline / proposal for extensions? #506
Comments
Parameter decorators are currently in stage 1, being explored here: https://github.com/tc39/proposal-class-method-parameter-decorators Function decorators are the other major candidate that seems to have enough momentum that they could be included in the language at some point. Personally I'm committed to seeing this proposal and the metadata proposal through the process, and I may try to help with Function decorators after that (given I have the time and energy), but I can't say which, if any, of the proposed extensions will be pursued beyond that. |
@pzuraq I think one frustrating thing as a developer is that, had the Like, I get that |
"Reactive variables" are something that nonzero people consider to be a footgun, myself included. |
@ljharb 🤷♂️ Possibly. But it makes UI state updates trivially easy. In the old days, you had to track each and every side effect, and patch manually, or just track nothing and destructively patch everything. And without operator overloading in JavaScript, at least allowing getter / setter on simple assignment / reference would simplify so much real-world code. |
@matthew-dean doesn’t that just mean users have to define a class or object with accessors to intercept access to reactive values? Is the goal to enable something like the reactivity in Svelte’s reactive statements? |
Svelte reactivity isn't implementable even with reactive variables because Svelte also treats a module as an instantiable thing, like a class. |
@justinfagnani Yeah I was going to bring that up, I just am trying to understand the use cases before digging into potential issues, wanna make sure I’m not missing anything. |
I definitely want to see function decorators as soon as possible. I tend to favor less object-oriented design patterns in JS. Object literal and property decorators also interest me, as I use those more than classes. |
yes, i also think function decorators would be the most useful. i also think that const decorators would also be extremely useful, as you can wrap any value into any other value in an extremely simple way. |
This repo has a lot of really great & valuable extensions that could limit boilerplate in a lot of userland reactive libraries (specifically / let & const decorators).
Is there a separate proposal that tracks those?
The text was updated successfully, but these errors were encountered: