Web development keeps changing, and it's all about building fast, reliable websites and apps. That's why many developers use tools like Strapi, a headless CMS, and Next.js.
Hey, I have opened an issue in this article’s GitHub repo. Basically, it’s very frustrating to try and use nested component data. Also I think that there are still some issues with how the API responds and what the types actually represent (nested data and attribute keys, no arrays where they should actually be). Could be I am using this the wrong way or there’s still some work to do to get everything 100% working. Some examples in the issue that I’ve mentioned.
if you are working in a monorepo you can create a dev dependency in the frontend module on the strapi module and then import the contentTypes.d.ts. no need to copy the file.
I found some errors in the types.ts file. for example:
in type MediaValue it should be APIResponse and not APIResponseData
Normally this is something that should be working. Can you give more context on the issue your are having. Also, are you sure that your project is loading types from types found in types/generated/components.d.ts.
Which type are you using exactly that return this undefined value? In any case, even required fields can be undefined when ‘draft and publish’ is enabled.