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

Cancelling effects on unmount #9

Open
allforabit opened this issue Aug 26, 2020 · 1 comment
Open

Cancelling effects on unmount #9

allforabit opened this issue Aug 26, 2020 · 1 comment

Comments

@allforabit
Copy link

Hi there, really nice idea to port the elm(ish) architecture to react hooks. It seems like a very nice approach!

Perhaps there's a way of working around but the effects don't seem to cancel on unmount. For example if I copy and paste the tick tock example into a component and then navigate to cause a component unmount it causes an error (in react dev mode).

@ncthbrt
Copy link
Owner

ncthbrt commented Nov 25, 2020

Hi @allforabit. Cancellation of effects is an interesting one.

I'd be open to suggestions on how to achieve this in a way that still makes defining effects simple and is at least somewhat backwards compatible with the current way of doing things.

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

No branches or pull requests

2 participants