On line two you declare ReactDom
(and assign (ie write ) the imported value from the react-dom module to it).
import ReactDom from 'react-dom';
… and then you never do anything with it (ie you don't read the value back out of the ReactDom
variable).
Normally in a React application you would use ReactDom
to insert a component into the DOM, but here you just console.log
the result of evaluating some JSX instead.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.