Subscribing with the connectTo decorator
Basic Usage
// app.ts
import { connectTo } from 'aurelia-store';
import { State } from './state';
@connectTo()
export class App {
state: State;
}Custom Selectors
// app.ts
import { connectTo } from 'aurelia-store';
import { State } from './state';
import { pluck } from 'rxjs/operators';
@connectTo({
selector: (store) => store.state.pipe(pluck('frameworks'))
})
export class App {
state: string[]; // state will now only contain the frameworks array
}Multiple Selectors and Targets
Custom Setup and Teardown
Change Handling
Last updated
Was this helpful?