
上面没有return返回值,应该如下
const Products = (props) => (
return <h2>List of Products</h2>;
);
请学习下es6箭头函数,
传送门http://es6.ruanyifeng.com/#docs/function#%E7%AE%AD%E5%A4%B4%E5%87%BD%E6%95%B0
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Most helpful comment
请学习下es6箭头函数,
传送门http://es6.ruanyifeng.com/#docs/function#%E7%AE%AD%E5%A4%B4%E5%87%BD%E6%95%B0