Hi, I am following given guideline by mosh for rendering Hello World on visual studio and it gives error. I am not getting the issue, find below my code syntax and error message respectively.
Code
import React from “react”;
import ReactDOM from “react-dom”;
const element = < h1 > hello world < /h1>;
console.log(element);
Error Message
ReactDOM’ is declared but its value is never read.ts(6133)
JSX element ‘h1’ has no corresponding closing tag.ts(17008)
Identifier expected.ts(1003)
‘>’ expected.ts(1005)
Unexpected token. Did you mean {'>'} or >?ts(1382)
Hi, Thank you, Issue is that I just began the course “Mastering React” by mosh. I followed the instruction and syntax introduced by Mosh in lecture. I am afraid I would not be able to keep up with the rest of course. I installed latest version of node.js. Can you tell me how to fix it? The code shared by Mosh is outdated?