canMount

Invoked before the mount process.

Returns

boolean True if the component should mount.

Example

const Example = new class extends Component {
    canMount() {
        return false;
    }
    mounted() {
        console.log("This life cycle method will never fire.");
    }
}();

Example.mound(document.getElementById("root");

Last updated