mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-26 15:42:09 +00:00
docs: fix typos in useState
(#1962)
This commit is contained in:
parent
1c8b751cfa
commit
5f5eb39ae4
@ -29,7 +29,7 @@ const state = useState<T>(key: string, init?: () => T): Ref<T>
|
|||||||
|
|
||||||
## Shared State
|
## Shared State
|
||||||
|
|
||||||
Using [auto imported composables](/docs/directory-structure/composables) we can define global typesafe states.
|
Using [auto-imported composables](/docs/directory-structure/composables) we can define global type-safe states.
|
||||||
|
|
||||||
```ts [composables/states.ts]
|
```ts [composables/states.ts]
|
||||||
export const useColor = () => useState<string>('color', () => 'pink')
|
export const useColor = () => useState<string>('color', () => 'pink')
|
||||||
|
Loading…
Reference in New Issue
Block a user