Re:Simple React Patterns
by travmatt on Friday November 10, 2017 @12:40PM
(#15671494)
Set a variable... set a property in the component state? Or set a static variable on the class?
[ Parent
| on HN ]
I use a static var on the class.
componentDidMount() {
if (!this.unmounted) ...
}
componentWillUnmount() {
this.unmounted = true
}