docs: clarify composable default name inference (#1318)

This commit is contained in:
Dustin Newell 2021-10-21 10:34:54 -04:00 committed by GitHub
parent 9d40a271ee
commit fe6f6f5868
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -24,9 +24,9 @@ Example: (using default export)
```js [composables/use-foo.ts or composables/useFoo.ts]
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 () {
return 'foo'
return 'bar'
}
```