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

Implements createSideEffect #255

Merged
merged 2 commits into from Mar 31, 2022
Merged

Implements createSideEffect #255

merged 2 commits into from Mar 31, 2022

Conversation

tbranyen
Copy link
Owner

This introduces createSideEffect which matches useEffect from React. It is currently incomplete, but in a somewhat usable form. I need to do some refactoring around how/when we call lifecycle methods as the current approach isn't entirely accurate.

Right now we call componentWillUnmount after patching, which is not right, it should happen before the element actually unmounts.

Adds tests and improvements to createState and createSideEffect.
Specifically around error handling and awaiting a state change.
@tbranyen tbranyen merged commit 53bade0 into master Mar 31, 2022
@tbranyen tbranyen deleted the create-side-effect branch November 28, 2022 15:37
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.

None yet

1 participant