Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

I'm getting no errors when using react on vscode

I'm using vscode and I'm trying to learn react.

This what it shows me: how it looks like when I write it

This code can't run because I don't access to item, but it show me no error...

I started watch video about react and this how it supposed to look like, as it on his computer: what I saw in the video

EDIT: I've installed eslint https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint

and now it show me the error.

like image 746
Itamar Shubin Avatar asked Feb 13 '26 21:02

Itamar Shubin


1 Answers

Your variable item is not defined. You need to define that previously.

Also, in your context the key prop on your first div is not needed, as you're not looping through an array of elements and rendering DOM elements for them.

like image 198
Kenny Meyer Avatar answered Feb 16 '26 10:02

Kenny Meyer



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!