//This is the greet.js file
import React from "react"; functionGreet() { return ( Welcome
) } export default Greet //This is the indx.js file
import React,{Component} from 'react' import Greet from './Greet' class App extends Component { render() { } } //This is an html file
Here We Go
I'm trying to get data from greet.js and render it in indx.js, but I get the Cannot use import statement outside module error
type='module'to thescripttag to use theimport/exportsyntaxbabel,esbuild, or your favorite compiler on the server, or typebabeldirectly into HTML. You can also usevite