Chapter 7: section - Fetch Data for <Card> components
TL;DR Getting error Type '{ title: string; value: string; type: string; }' is not assignable to type 'IntrinsicAttributes'. Property 'title' does not exist on type 'IntrinsicAttributes'.
Hello, thank you for the wonderful tutorial. I have hit a wall with the following problem on adding the Card components to the page in Chapter 7.
It keeps complaining that Type '{ title: string; value: string; type: string; }' is not assignable to type 'IntrinsicAttributes'.
Property 'title' does not exist on type 'IntrinsicAttributes'.
I am unable to solve this or find any help on searching. The cards do not render on the page.
From what I understand, the Card component does have its props' type defined:
My final code in app/dashboard/page.tsx matches exactly with the provided solution in Chapter 7 at this point but does not render cards on the page.
Another observation, if this might help point to any issues in my setup, is that while the build fails in production with the same error message that vscode is showing me, it fails silently without a word in the dev environment while rendering the rest of the ui (no error messages or warnings on this issue in console).
Please help. What am I doing wrong
Update:
This change in cards.tsx fixed the error for me.
I tried a few more changes to the cards.tsx and definitions.ts files related to defining type for CardData.
Full change-set is here: https://github.com/kamalx/fictional-meme/commit/d7847189752f60bc7b07435cd39820d5c246987a
Noting here for my future reference.