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

feat: support signal #INFR-12381 #159

Merged
merged 4 commits into from
May 22, 2024
Merged

feat: support signal #INFR-12381 #159

merged 4 commits into from
May 22, 2024

Conversation

luxiaobei
Copy link
Contributor

No description provided.

select(selector: string | any): Observable<any> {
return this.state$.pipe(map(selector), distinctUntilChanged());
select<TResult>(selector: (state: T) => TResult): Signal<TResult> {
return computed(() => selector(this.state()));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这种方式你测试一下 state 是一个对象,select 了其中的一个 a 属性,然后修改了 b 属性会不会触发 a selector?

@why520crazy why520crazy merged commit 102b79a into master May 22, 2024
1 check passed
@why520crazy why520crazy deleted the luxiaobei/feat-signal branch May 22, 2024 08:29
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.

2 participants