JSX
tip:使用jsx必须引用react
const Hello = (props)=>{
return (
<h1>{props.children}</h1>
)
}
export default Hello
image.png
解决方案
+import React from 'react'
const Hello = (props)=>{
return (
<h1>{props.children}</h1>
)
}
export default Hello
网友评论