Invoked before the mount process.
boolean True if the component should mount.
const Example = new class extends Component { canMount() { return false; } mounted() { console.log("This life cycle method will never fire."); } }(); Example.mound(document.getElementById("root");
<div id="root"></div>
Last updated 6 years ago