isMounted
boolean isMounted()
isMounted()
returns true
if the component is rendered into the DOM, false
otherwise. You can use this method to guard asynchronous calls to setState()
or forceUpdate()
.
This method is not available on ES6
class
components that extendReact.Component
. It will likely be removed entirely in a future version of React, so you might as well start migrating away from isMounted() now.
Please login to continue.