ngneat / effects

🪄 A framework-agnostic RxJS effects implementation
https://www.netbasal.com
MIT License
63 stars 11 forks source link

Dispatching effects throw an error #42

Closed frango9000 closed 1 year ago

frango9000 commented 1 year ago

Which @ngneat/effects-* package(s) are the source of the bug?

effects

Is this a regression?

No

Description

Effects are throwing an error when dispatched.

When following the Documentation example:

loadTodos$ = createEffect(actions => actions.pipe( ofType(loadTodos), switchMap((todo) => this.todosApi.loadTodos()) ));

Please provide a link to a minimal reproduction of the bug

https://stackblitz.com/edit/angular-mctwxe?file=src/main.ts

Please provide the exception or error you saw

ERROR
Error: Make sure to provide a valid action type or set the option {dispatch: false}

Please provide the environment you discovered this bug in

"@ngneat/effects": "2.1.0",
        "@ngneat/effects-ng": "3.0.0",

Anything else?

No response

Do you want to create a pull request?

Yes

stackblitz[bot] commented 1 year ago

Fix this issue in StackBlitz Codeflow Start a new pull request in StackBlitz Codeflow.

NetanelBasal commented 1 year ago

@EricPoul, Do we handle it in your last PR that we merged?

EricPoul commented 1 year ago

Nope, it's a bug. I see it. I'll make a pr to fix it