NUXT_E7009

useState key must be a string.

E7009

useState() was called with a key that is not a string. The key identifies the shared state across the app and in the hydration payload, so it must be a non-empty string.

Resolution

const counter = useState('counter', () => 0)
Read more in Docs > API > Composables > Use State.
Was this helpful?