> For the complete documentation index, see [llms.txt](https://combo-js.gitbook.io/project/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://combo-js.gitbook.io/project/apis/component/canupdate.md).

# canUpdate

Invoked before the update process.

### Parameters

* **prev**: object The previous component state.

### Returns

**boolean** True if the component should update its state.

### Example

{% tabs %}
{% tab title="JavaScript" %}

```javascript
const Example = new class extends Component {
    created() {
        this.update({});
    }
    canUpdate() {
        return false;
    }
    updating() {
        console.log("This life cycle method will never fire.");
    }
}();

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

{% endtab %}

{% tab title="HTML" %}

```markup
<div id="root"></div>
```

{% endtab %}
{% endtabs %}
