WebStorm Flow集成 - 使用React和Redux进行误报

时间:2017-06-05 18:58:36

标签: reactjs react-redux webstorm flowtype

我有一个声明道具的组件: enter image description here

我在另一个地方使用它: enter image description here

ModalWindow组件通过react-redux连接并从商店获取其道具,这就是为什么WebStorm不应该报告这一点(流程不会抱怨)。

P.S。实际上还有另一个问题,即historywithRoute代替组件定义而不提供connect道具,流程对此很安静。但不幸的是,这个故事不同......

我可以告诉WebStorm这个道具确实提供了吗?

我让它消失的方式是声明:

ModalWindow.propTypes = {
  //they can be even empty!
};

0 个答案:

没有答案