How to Cancel a Redux Saga action?

I spent some time figuring out the answer to this question. This isn't a big deal if you are not really concerned about memory leaks or unnecessary operations (server request etc.) in your React Native (or React or where ever you are using redux-saga) application. Anyway, if you are here you care so let's dig into my specific problem and how to solve it.
Let's say you are using redux-saga to handle all of your API requests and every time you need some data you dispatch an action with request parameters and callbacks to handle the returned data, your action goes and finds the saga from the watchers you wrote and uses some generic request function to get the data. After getting your response you put your data in the hands of the callback to carry back to your page (you can also use a reducer to store your data but in this case let's say it doesn't make much sense to use). Well maybe in most cases the page will be there waiting to update the state with your data but sometimes the page closes and you see a warning saying something like don't try to update a state in an unmounted component. Read More