Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@NetanelBasal
Last active September 24, 2018 20:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save NetanelBasal/d840df2d8adbb25877edc96c7a200f6c to your computer and use it in GitHub Desktop.
Save NetanelBasal/d840df2d8adbb25877edc96c7a200f6c to your computer and use it in GitHub Desktop.
export interface DemoState {
someProp: number;
}
export function createInitialState(): DemoState {
return {
someProp: 0
};
}
@StoreConfig({ name: 'demo' })
export class DemoStore extends Store<DemoState> {
constructor() {
super(createInitialState());
}
}
export class DemoQuery extends Query<DemoState> {
selectSomeProp$ = this.select(state => state.someProp);
constructor(protected store: DemoStore) {
super(store);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment