Quantcast
Channel: Active questions tagged react-native+typescript - Stack Overflow
Viewing all articles
Browse latest Browse all 6287

Property 'id' does not exist on type '{ id: string; content: string; }[]' [duplicate]

$
0
0

I am super new to javascript and typescript and I am working on a kanban board React native project from a youtube video.

Video link: https://www.youtube.com/watch?v=Vqa9NMzF3wc&t=1338s

I am getting the error mentioned in the header and I will paste a screenshot of the code sections :

Declaration of columns and items

Code segment with error

Error log

While hovering over 'item' on line 57 of the second screenshot VSCode shows what that object is as the following:

(parameter) item: {id: string;content: string;}[]

I believe this means that it is a json object with 2 attributes 'id' and 'content', so I have no clue why that error is being thrown.

Kindly help me out !


Viewing all articles
Browse latest Browse all 6287

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>