📜  函数作为反应子无效 - Javascript代码示例

📅  最后修改于: 2022-03-11 15:04:02.401000             🧑  作者: Mango

代码示例1
//instead of passing in a function as a child
   ❌     //this is not the correct way of doing it 
const MyElement = () =>(   
    <>
          

This is a sample element

) ...return( ) ✅ //do this instead const MyElement = ( <>

This is the correct way

) ...return( )