Open jeannen opened 11 months ago
Hello,
I'm not sure to understand the issue. What is the issue of using useAsyncData and what will be improved if you have useContent
?
Hello,
I'm not sure to understand the issue. What is the issue of using useAsyncData and what will be improved if you have
useContent
?
If I use both < ContentDoc /> and useAsyncData()
, isn't it going to fetch the data twice?
The way I got around data being fetched twice for now was using ContentRenderer
directly instead of ContentDoc
then passing the data from queryContent
through the value
prop.
Same problem here
This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 30 days.
Hi! I'm new to Github so I hope this is the right place for that
Is your feature request related to a problem? Please describe
I would like to access the content object containing the title, content, etc from my /content/blog.
I have a
[...slug].vue
file in my /pages/blog folder, where I'd like to access the article info. I saw we could useuseContent()
to access it but for that I need to enable "document driven mode". It would be nice to be able to access it directly.Describe the solution you'd like
Instead of having to enable documentDriven mode in the config, have useContent accessible by default.
Describe alternatives you've considered
It kinda works with queryContent() but isn't it overkill? Like, isn't it going to re-fetch the article after it was sent to the template? Could be nice to have access to all document data directly
Additional context
My page: