Skip to content

Handle MaybeComputedRef for UseJsonld input field #1071

@ymmooot

Description

@ymmooot

Currently, useHead can handle MaybeComputedRef like below:

// 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.

// static
useJsonld({
  name: "title",
});
// function
useJsonld(() => ({
  name: someRef.value, // .value needed
}))
  • Handle MaybeComputedRef like useHead
  • Fix broken link to useHead in README

working on nuxt-jsonld/tree/reactive

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions