You don't need JSON.stringify
in JSX. You do need to insert this into your JSX with a surrounding element. You shouldn't need the +
for concatenating strings anymore either.
export default function App() {
const studentCountInitial = 4;
const initialStudentCounter = <div>Students <span style={{color : 'red'}}>{studentCountInitial}</span></div>;
return (
initialStudentCounter
);
}
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…