mirror of
https://github.com/nuxt/nuxt.git
synced 2025-02-16 21:58:19 +00:00
docs: clarify composable default name inference (#1318)
This commit is contained in:
parent
9d40a271ee
commit
fe6f6f5868
@ -24,9 +24,9 @@ Example: (using default export)
|
|||||||
```js [composables/use-foo.ts or composables/useFoo.ts]
|
```js [composables/use-foo.ts or composables/useFoo.ts]
|
||||||
import { useState } from '#app'
|
import { useState } from '#app'
|
||||||
|
|
||||||
// It will be available as useFoo()
|
// It will be available as useFoo() (pascalCase of file name without extension)
|
||||||
export default function () {
|
export default function () {
|
||||||
return 'foo'
|
return 'bar'
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user