需求:使用React创建以下标签
使用jsx创建虚拟DOM
// 1.创建虚拟DOM
const VDOM = <h1 id="title"><span>Hello React</span></h1>;//此处不要写引号,因为不是字符串//
// 2.渲染虚拟DOM到页面
ReactDOM.render(VDOM,document.getElementById('test'));
<!-- jsx创建虚拟DOM是js创建虚拟DOM的语法糖 -->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title