Skip to content
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

Merged
merged 3 commits into from
Oct 24, 2023
Merged

Add cause to error.ts #801

merged 3 commits into from
Oct 24, 2023

Conversation

lc-mm
Copy link

@lc-mm lc-mm commented Oct 23, 2023

Motivation

Maintain a reference to the original error

Approach

Add the cause attribute

@cowboyd
Copy link
Member

cowboyd commented Oct 24, 2023

@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?

@lc-mm
Copy link
Author

lc-mm commented Oct 24, 2023

Yes I am running this code in my production app now.

@cowboyd
Copy link
Member

cowboyd commented Oct 24, 2023

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?

@cowboyd cowboyd merged commit 9e76be7 into thefrontside:v2 Oct 24, 2023
2 checks passed
@lc-mm
Copy link
Author

lc-mm commented Oct 24, 2023

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:

window.addEventListener = (x: unknown) => x;
window.removeEventListener = (x: unknown) => x;

@cowboyd
Copy link
Member

cowboyd commented Oct 26, 2023

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.

@lc-mm
Copy link
Author

lc-mm commented Oct 26, 2023

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants