GitHub

  • import { Injectable } from ‘ @angular/core ‘ ; import { Action } from ‘ @ngrx/store ‘ ; import { ActionCreatorFactory } from ‘ ngrx-action-creator-factory ‘ ; @ Injectable () export class NowPlaylistActions { static MEDIA_ENDED = ‘ [NOW PLAYLIST] MEDIA_ENDED ‘ ; static QUEUE = ‘ [NOW PLAYLIST] QUEUE ‘ ; static SELECT = ‘ [NOW PLAYLIST] SELECT ‘ ; // as injectable constructor ( private acf : ActionCreatorFactory ) { this .
  • The factory allows to decalre a minimal action creator declaration with a typed payload for the action creator function and have type support when using this function.
  • Whenever a ts file is changed, it will rerun the tests.
  • npm install ngrx-action-creator-factory –save-dev
  • The service came out as a result of the open source project Echoes Player – an alternative player for watching and listening to media from youtube.

ngrx-action-creator-factory – An Action Creator Factory for ngrx
Continue reading “GitHub”

redux-observable/index.js at master · redux-observable/redux-observable · GitHub

Neat redux-observable example with RxJS 5:

  • // When our request comes back, we transform it into an action
  • // Abort fetching the user if someone dispatches an abort action
  • export const FETCH_USER_ABORTED = ‘ FETCH_USER_ABORTED ‘ ;
  • // Let’s us immediately update the user’s state so we can display
  • blesh docs(ofType): update examples and docs to use `ofType`

Read the full article, click here.


@dan_abramov: “Neat redux-observable example with RxJS 5:”


redux-observable – RxJS middleware for Redux


redux-observable/index.js at master · redux-observable/redux-observable · GitHub