-
-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Proposal bind shorthand #37
Conversation
# Conflicts: # force-app/lwc/signals/core.js # src/lwc/signals/core.ts
import { counter, counterPlusTwo } from "c/demoSignals"; | ||
|
||
export default class CountTracker extends LightningElement { | ||
bindTest = $binded(this, "bindTest").to(counter); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I understand why you are doing this but I don't love it. Not sure what would be a better way to do the binding
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, that's why I'm keeping it as a proposal stage until I get some feedback, not sure if you saw the issue I put up for discussion: #38
I don't want to merge if its going to be detrimental compare to what exists today, but I haven't found a better way of doing it with how Javascript works today. The only way I can think this could be done is by using decorators, but JS doesn't support those yet.
this.propertyName = propertyName; | ||
} | ||
to(signal) { | ||
$effect(() => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this ok performance wise?
- Introduced a `stackDepth` tracker in effect execution to manage circular dependencies. - Effects can now re-enter up to a maximum stack depth of 16 without throwing an error. This change allows limited circular dependencies while preventing infinite loops.
See the release details: v1.4.0
* fix: Rebuild * Commit from GitHub Actions (CI) --------- Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
See the release details: v1.4.1
🎉 This PR is included in version 1.5.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
Bind feature based on this proposal: #38