-
Notifications
You must be signed in to change notification settings - Fork 0
@bynary.composables.ngxs
github-actions[bot] edited this page Jul 11, 2024
·
14 revisions
@bynary/composables / @bynary/composables/ngxs
Composables for NGXS.
@Component({
template: `
My books:
<ul>
<li *ngFor="let book of books()>{{ book }}</li>
</ul>
`
})
class BooksComponent {
// legacy way using an Observable
@Select(BooksState.books)
books$: Observable<string[]>;
// new way using a signal
books = useSelect(BooksState.books);
}