带有react的Flowtype错误:这种类型与JSX Intrinsic的道具不兼容

时间:2016-11-19 10:04:49

标签: reactjs flowtype

React.createElement(FilterLink, { filter: 'SHOW_ALL', children: React.createElement(
    'span',
    null, // flow error : null This type is incompatible with props of JSX Intrinsic: `span`
    'All'
  ) }),

有人可以解释这个错误的含义吗?

1 个答案:

答案 0 :(得分:1)

在IRC上得到答案:

React.createElement(FilterLink, { filter: 'SHOW_ALL', children: React.createElement(
    'span',
    {}, // no more error
    'All'
  ) }),