一、插值语法 – {}
const str = 'hello react';
const VDOM = <h1>{
str}</h1>; // 注意:是一对大括号 {} 和 Vue( {
{}} ) 区分开
二、给标签添加类名 – className= "" | {}
/*
css:
.active {
background-color: red;
}
*/
一、插值语法 – {}
const str = 'hello react';
const VDOM = <h1>{
str}</h1>; // 注意:是一对大括号 {} 和 Vue( {
{}} ) 区分开
二、给标签添加类名 – className= "" | {}
/*
css:
.active {
background-color: red;
}
*/