Skip to content

@bynary.composables.ngxs

github-actions[bot] edited this page Jul 11, 2024 · 14 revisions

@bynary/composables / @bynary/composables/ngxs

@bynary/composables/ngxs

Composables for NGXS.

Example

@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);
}

Index

Functions

Clone this wiki locally