question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

saga.apply is not a function

See original GitHub issue

screen shot 2016-02-18 at 4 05 29 pm

I’m encountering this w/ react-native@0.20 and redux-saga@0.8.2.

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
yelouaficommented, Feb 18, 2016

It’s likely because you passed the result of a generator function instead of the function itself

function*saga() { ... }

// wrong
mid = sagaMiddleware(saga())

//correct
mid = sagaMiddleware(saga)
0reactions
danscancommented, Feb 18, 2016

That worked. Thank you!

Read more comments on GitHub >

github_iconTop Results From Across the Web

React native redux saga TypeError - Stack Overflow
I am trying to dispatch an action through saga, but I am getting TypeError: resultFunc.apply is not a function error.
Read more >
API Reference - Redux-Saga
saga must be a function which returns a Generator Object. ... Each function below returns a plain JavaScript object and does not perform...
Read more >
dispatch is not a function' inside of my alert.js action file ...
I am new to using Redux. I have made a reducer and action to have an alert display whenever an item is saved....
Read more >
Async operations using redux-saga - Medium
Basically a helper library which allows us to organize all the asynchronous and distributed operations based on Sagas and ES6 Function Generators.
Read more >
Redux Toolkit's new listener middleware vs. Redux-Saga
Predicate: the predicate property is a function that returns true or false to determine whether the effect callback should run or not. It...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found