-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add cause to error.ts #801
Conversation
@lc-mm Before I write a test case for this, have you confirmed that this will work for you by linking it into your codebase and attempting to run it? |
Yes I am running this code in my production app now. |
@lc-mm Fantastic! If I may ask, how long have you been using Effection, and how do you find using it? |
I chose Effection 2-3 months ago to build out a new feature. I wanted to use generators because I had good experiences in the past using redux saga. So far I have enjoyed using it. I did choose to go with v2 until v3 is out of beta. On a side note I am using it in react native and did have to add this in order to start using it:
|
Interesting. I'm guessing it's because the main() method? https://github.com/thefrontside/effection/blob/v2/packages/main/src/browser.ts#L33 What would we do to detect the react native app unloading? Also, please let us know if there's any questions you have, or feedback. We're always looking for ways to improve. |
There is no way that I know of to detect the app closing or unloading, You can detect application states such as foreground or background. When the user closes an app the execution stops without any notice |
Motivation
Maintain a reference to the original error
Approach
Add the
cause
attribute