Problem described here too, but the response was not elaborative React can't be found
import React from 'react' <- I know this statement is correct
Since "React" is a default export and not a named export, shouldn't this statement work too:
import react from 'react'
I know React.createElement() will be called in future, but why isn't react.createElement() correct? After all, the word "React" is just a name to refer to 'react' module.
React.createElement()Reactto compile theJSXReactis a default export and you can import it as whatever you like. The problem occurs when the compiler wants to compile your code. The compiler will look forReactin order to useReact.createElementfor example and if you defineReactin any other way you will face a problem with the compiler.