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

Linked signal fixes #15

Merged
merged 4 commits into from
Nov 25, 2024
Merged

Linked signal fixes #15

merged 4 commits into from
Nov 25, 2024

Conversation

crutchcorn
Copy link
Member

While building TanStack Store, I noticed that both it and this package have issues reading input.required logic from a selector:

@Component({
    selector: 'app-count-and-add',
    standalone: true,
    template: `
      <button aria-label="Increment value" (click)="dispatch(increment())">
        Increment
      </button>
      <p>Count: {{ count() }}</p>
    `,
  })
  class CountAndAdd {
    dispatch = injectDispatch();
    increment = counterSlice.actions.increment;
    addBy = input.required<number>();
    count = injectSelector((state: any) => state.counter.value + this.addBy());
  }

However, the fix to this solution is to use linkedSignal to sidestep the timings of input.required, so we bumped the major to 2.x and only support Angular 19+

Copy link

netlify bot commented Nov 25, 2024

Deploy Preview for angular-redux-docs canceled.

Name Link
🔨 Latest commit 6997e96
🔍 Latest deploy log https://app.netlify.com/sites/angular-redux-docs/deploys/67446f4e633ee10008ada278

@crutchcorn crutchcorn merged commit d7d19a7 into main Nov 25, 2024
6 checks passed
@crutchcorn crutchcorn deleted the linked-signal-fixes branch November 25, 2024 12:38
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

Successfully merging this pull request may close these issues.

1 participant