Skip to content

Instantly share code, notes, and snippets.

@brakmic
Last active April 11, 2017 11:14
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 brakmic/7ea9406991f99da5ae49ae945eca593c to your computer and use it in GitHub Desktop.
Save brakmic/7ea9406991f99da5ae49ae945eca593c to your computer and use it in GitHub Desktop.
helper methods for state extraction
export function getCustomerState(state$: Observable<IAppState>): Observable<ICustomerState> {
return state$.select(state => state.customerState);
}
export const getCustomer: (obs: Observable<IAppState>) => Observable<ICustomer> = compose(fromSubstates.getCustomer, getCustomerState);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment