```ts
import { Component, inject } from '@angular/core';
import { JsonPipe } from '@angular/common';
import { BookSearchStore } from './book-search-store';
@Component({
imports: [JsonPipe],
template: `
Books: {{ store.books() | json }}
Loading: {{ store.isLoading() }}
Pagination: {{ store.filter() | json }}
Query: {{ store.filter.query() }}
Order: {{ store.filter.order() }}
`,
providers: [BookSearchStore],
})
export class BookSearch {
readonly store = inject(BookSearchStore);
}
```
## Defining Store Properties
Computed signals can be added to the store using the `withComputed` feature.
This feature accepts a factory function as an input argument, which is executed within the injection context.
The factory should return a dictionary containing either computed signals or functions that return values (which are automatically wrapped in computed signals), utilizing previously defined state signals, properties, and methods that are accessible through its input argument.