---
url: /docs/guide/usage/linter/rules/vue/next-tick-style.md
---

### What it does

Enforce Promise or callback style in `nextTick`.

### Why is this bad?

In Vue.js, `nextTick` can be used either by passing a callback or
by using the returned Promise. Mixing these styles makes the code
harder to read and inconsistent. Choose one style consistently.

### Examples

Examples of **incorrect** code for this rule with default `"promise"` option:

```js
this.$nextTick(() => {});
Vue.nextTick(() => {});
import { nextTick } from "vue";
nextTick(() => {});
```

Examples of **correct** code for this rule with default `"promise"` option:

```js
this.$nextTick().then(() => {});
await Vue.nextTick();
import { nextTick } from "vue";
await nextTick();
```

Examples of **incorrect** code for this rule with `"callback"` option:

```js
await this.$nextTick();
Vue.nextTick().then(() => {});
```

Examples of **correct** code for this rule with `"callback"` option:

```js
this.$nextTick(() => {});
Vue.nextTick(() => {});
```

## Configuration

This rule accepts one of the following string values:

### `"promise"`

Require using the Promise returned by `nextTick`.

### `"callback"`

Require passing a callback function to `nextTick`.

## How to use

## Version

This rule was added in v1.69.0.

## References
