We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MaybeComputedRef
Currently, useHead can handle MaybeComputedRef like below:
useHead
// static useHead({ title: "title", }); // function useHead(() => ({ title: someRef, })) // ref, computed, and reactive useHead({ title: someRef, })
useJsonld can only handle a static object and a function.
useJsonld
// static useJsonld({ name: "title", }); // function useJsonld(() => ({ name: someRef.value, // .value needed }))
working on nuxt-jsonld/tree/reactive
The text was updated successfully, but these errors were encountered:
Any update? I am trying to use a computedRef inside of useJsonld and I am getting this error:
"Converting circular structure to JSON\n --> starting at object with constructor 'ComputedRefImpl'\n | property 'effect' -> object with constructor 'ReactiveEffect'\n --- property 'computed' closes the circle",
Sorry, something went wrong.
Hi @TimGuendel. Currently you can not pass a computed value directly:
// This does not work const nameComputed = computed(() => 'Alice'); ustJsonld({ name: nameComputed, });
However, you can do this:
// This works fine const nameComputed = computed(() => 'Alice'); ustJsonld(() => ({ name: nameComputed.value, }));
Converting circular structure to JSON
Please make sure there are no circular references in your object.
ymmooot
No branches or pull requests
Currently,
useHead
can handleMaybeComputedRef
like below:useJsonld
can only handle a static object and a function.MaybeComputedRef
likeuseHead
useHead
in READMEworking on nuxt-jsonld/tree/reactive
The text was updated successfully, but these errors were encountered: