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

Consider allowing setState while UNMOUNTING #133

Closed
yungsters opened this issue Jun 28, 2013 · 1 comment
Closed

Consider allowing setState while UNMOUNTING #133

yungsters opened this issue Jun 28, 2013 · 1 comment

Comments

@yungsters
Copy link
Contributor

Should we let people invoke setState in componentWillUnmount? It seems harmless, but currently we throw. In theory, this.state should be cleared out when unmounting (but we do not for backward compatibility reasons).

Aside, as we get better at clearing asynchronous callbacks on unmount, we should seriously consider clearing this.state and this.props when unmounting.

@vjeux
Copy link
Contributor

vjeux commented Jan 6, 2014

This hasn't been updated in 6 months, closing it. Please re-open if you think that it should still be done

@vjeux vjeux closed this as completed Jan 6, 2014
bvaughn pushed a commit to bvaughn/react that referenced this issue Aug 13, 2019
taneliang referenced this issue in MLH-Fellowship/react Aug 17, 2020
Summary
===

1. Fix some errors manually
1. Copy some updated ContextMenu code from original React sources

Resolves #38.

Test Plan
===

1. `yarn flow`: No errors
1. `yarn lint`
1. `yarn test`
1. `yarn start`: Everything still works, especially the context menu.
taneliang referenced this issue in MLH-Fellowship/react Aug 19, 2020
Summary
===

1. Fix some errors manually
1. Copy some updated ContextMenu code from original React sources

Resolves #38.

Test Plan
===

1. `yarn flow`: No errors
1. `yarn lint`
1. `yarn test`
1. `yarn start`: Everything still works, especially the context menu.
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