Warning: Functions are not valid as a React child. This may happen if you return a Component instead of <Component /> from render. Or maybe you meant to call this function rather than return it. RenderedRoute@http://localhost:3000/static/js/bundle.js:44564:7 Routes@http://localhost:3000/static/js/bundle.js:44986:7
旧写法:
新写法 :
component需要改成element。element={} 好像解析的是字符串,所以要包html元素, home需要加上div,a,h1....,组件需要写成<Home/>