Home > Mobile >  Typescript error on component IntrinsicAttributes
Typescript error on component IntrinsicAttributes

Time:09-11

Im getting this error, "The type '{ data: dataProp[]; }' cannot be assigned to type 'IntrinsicAttributes & dataProp'. A property 'data' does not exist on type 'IntrinsicAttributes & dataProp'."

On the red arrow if i use "| any" is working so i think the problem is there, a type is needed.

enter image description here

enter image description here

CodePudding user response:

In one place you using array of objects in else just object. Change "Cards = {data: dataProp}" on "Cards = {data: dataProp[]}"

  • Related