Replies: 3 comments 1 reply
-
Hi, thanks for the suggestion. Nice idea, but maybe an opt-in option should be added: // nuxt.config.ts
{
anime: {
composables: true // default is undefined
}
} With this option, the user chooses which method he wants to use. If enables composables, then Main reason is to avoid multiple global injections at the same time (provide and composable). Also, keep in mind that the user can disable built-in auto imports. In that case we will need an explicit import: // Explicit import (optional)
import { useAnime } from '#anime' and the additional {
anime: {
autoImport: true // default is true
}
} By default, module I'm interested in merging this, I think it would be nice addition to module. Can you please update the PR? Don't bother with the docs and examples, I can edit it later, no problem. |
Beta Was this translation helpful? Give feedback.
-
@ivodolenc See here for the changes made --> f910e35. Now if yo pass this to your export default defineNuxtConfig({
// ...
anime:{
composable: true
}
// ...
}) |
Beta Was this translation helpful? Give feedback.
-
This feature is now available in To use // nuxt.config.ts
{
anime: {
composables: true
}
} Additionally, if you prefer to use only composables, you can disable the // nuxt.config.ts
{
anime: {
+ provide: false,
composables: true
}
} See the docs for more info. @BayBreezy Thanks again for your time and contribution. |
Beta Was this translation helpful? Give feedback.
-
Request Description
Hello,
Instead of having to extract the
$anime
function from the nuxtApp, why not add auseAnime
composable that can be used right away?It can be added in the
module.ts
file.Alternative Solutions
NA
Additional Details
No response
Beta Was this translation helpful? Give feedback.
All reactions