Platform: Property 'payload' does not exist on type 'Action'. in ngrx/effect

Created on 20 Oct 2017  路  5Comments  路  Source: ngrx/platform

I am unable to complete the installation guide on effects on the readme https://github.com/ngrx/platform/blob/master/docs/effects/README.md page. I keep having the error ' Property 'payload' does not exist on type 'Action'.'

After following the guide in the doc, i am unable to solve the problem.

Please what do I do from here?

I'm submitting a...


[ ] Regression (a behavior that used to work and stopped working in a new release)
[ ] Bug report  
[ ] Feature request
[ ] Documentation issue or request

What is the current behavior?

Expected behavior:

Minimal reproduction of the problem with instructions:

Version of affected browser(s),operating system(s), npm, node and ngrx:

Other information:

Most helpful comment

@bnlambert have a look at the sample app auth section at https://github.com/ngrx/platform/tree/master/example-app/app/auth - if you look at the actions you can see how the actions are set up with the payload parameter and how this is then used in the effects

All 5 comments

Thank you for the info. I do not know why the example on effects should make use of payload. I have read the info I can not still figure out how to solve this problem, I am using effects for the first time but the doc is not welcoming. https://github.com/ngrx/platform/blob/master/docs/effects/README.md

@bnlambert have a look at the sample app auth section at https://github.com/ngrx/platform/tree/master/example-app/app/auth - if you look at the actions you can see how the actions are set up with the payload parameter and how this is then used in the effects

@glendaviesnz Thank you very much. I will suggest that this link be included on the readme. May be it is already there and I missed it out. Thanks gain.

you can set it up like

newEffect : Observable<Action> = this.action$.pipe(
                                           ofType<CustomActionType>(ActionType)
                                           )
Was this page helpful?
0 / 5 - 0 ratings