I don t understand what is happening, the syntax seems to be right, but I m receiving this error:
类型:选择职业不是功能
// PARENT COMPONENT
import React, { useState } from react
export default function LayoutMain(props) {
const [message, setMessage] = useState("Hello World");
const chooseMessage = (message) => {
setMessage(message);
};
return (
<div>
<LayoutMenu>
<Navigator chooseMessage={chooseMessage} />
</LayoutMenu>
</div>
)
}
//CHILDREN COMPONENT
export default function Navigator({chooseMessage}) {
let msg = Goodbye ;
return (
<div className= navigator-header onClick={() => chooseMessage(msg)}>
test
</div>
)
}
我读过关于解除国家地位的文章,还观看了一些录像,并仔细地一再遵循指示,但没有成功。
#NEW UDPATE
我刚刚认识到,我的法典是绝对正确的,它必须是与汇编者有关的东西。