Skip to content

Conversation

@aleclarson
Copy link
Contributor

Summary

#234 (comment)

Every render call stores its unmount function in a global Set called cleanup.queue. This is how RTL does it (except it doesn't expose the queue). I exposed the queue on cleanup because it was easiest. You can adjust that in a follow-up commit if you want.

The cleanup function is never called automatically in this PR.

Test plan

f08f132

@thymikee thymikee requested a review from Esemesek December 6, 2019 21:08
Copy link
Member

@thymikee thymikee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. cc @Esemesek

@Esemesek Esemesek merged commit 4c77f4a into callstack:master Dec 9, 2019
@aleclarson
Copy link
Contributor Author

Can this be published to npm now?

@thymikee
Copy link
Member

@aleclarson yup, just released v1.12. Thanks for this contribution!

@hossamnasser938
Copy link

Should we update the readme to say that cleanup now exists?

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.

4 participants