Skip to content

Conversation

cesarParra
Copy link
Owner

@cesarParra cesarParra commented Jan 14, 2025

Bind feature based on this proposal: #38

import { counter, counterPlusTwo } from "c/demoSignals";

export default class CountTracker extends LightningElement {
bindTest = $binded(this, "bindTest").to(counter);
Copy link
Collaborator

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

Copy link
Owner Author

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(() => {
Copy link
Collaborator

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?

stanleyzapata and others added 13 commits January 21, 2025 11:14
- 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.
* fix: Rebuild

* Commit from GitHub Actions (CI)

---------

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
@cesarParra cesarParra marked this pull request as ready for review January 30, 2025 15:23
@cesarParra cesarParra merged commit a64ca63 into main Jan 30, 2025
Copy link
Contributor

🎉 This PR is included in version 1.5.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants