We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
If objects don't release reference when they unmount, it will cause memory leak.
A class which show and hide element according to state can easily demonstrate this, like below:
export default class myClass extends Component { constructor(props, context) { super(props, context); this.state = { isHidden: false }; } componentDidMount() { setInterval(() => { this.setState({ isHidden: !this.state.isHidden }); }, 10); } render() { return ( this.state.isHidden ? null : <CodeEditor /> ); } }
Some minutes later, will like this:
The text was updated successfully, but these errors were encountered:
fd2ced7
Merge pull request #36 from chentsulin/patch-3
3dcba6b
fix #35, release ref when will unmount
No branches or pull requests
If objects don't release reference when they unmount, it will cause memory leak.
A class which show and hide element according to state can easily demonstrate this, like below:
Some minutes later, will like this:
The text was updated successfully, but these errors were encountered: