Reactjs 流:响应子数组错误

Reactjs 流:响应子数组错误,reactjs,flowtype,Reactjs,Flowtype,我正在使用react@16.0.0-beta.5和流量-bin@0.54.0 我正在尝试在此组件上应用flowtype // @flow class SomeIcon extends Component<{}> { render() { return ( <i> <img src="" /> <span>Hello</span&g

我正在使用react@16.0.0-beta.5和流量-bin@0.54.0

我正在尝试在此组件上应用flowtype

// @flow
class SomeIcon extends Component<{}> {

    render() {
        return (
            <i>
                <img src="" />
                <span>Hello</span>
            </i>
        )
    }

}
/@flow
类SomeIcon扩展组件{
render(){
返回(
你好
)
}
}
和流说

14:     <i>
        ^^^ React element `i`
14:     <i>
        ^^^ React children array. This type is incompatible with
children?: React$Node,
           ^^^^^^^^^^ union: undefined | null | boolean | number | string | type application of type `React$Element` | type application of identifier `Iterable`
14:
^^^反应元素'i`
14:     
^^^反应子数组。此类型与不兼容
子节点?:反应$Node,
^^^^^^^^^^并集:未定义的| null |布尔|数字|字符串|类型'React$Element'的类型应用程序|标识符'Iterable'的类型应用程序`
当我移除
标记中的
标记时,流程正常。但如果我使用多个子项,flow就会抛出错误


有什么问题吗?

我在我的
.flowconfig

[libs]
./node_modules/immutable/dist/immutable.js.flow
Immutable.js
Immutable.Iterable
与的类型定义冲突
声明类型React$Node=…|Iterable


当我将Immutable.js更新为immutable@4.0.0-rc.2,冲突已解决。

我在我的
.flowconfig

[libs]
./node_modules/immutable/dist/immutable.js.flow
Immutable.js
Immutable.Iterable
与的类型定义冲突
声明类型React$Node=…|Iterable


当我将Immutable.js更新为immutable@4.0.0-rc.2,冲突已解决。

流中的React子元素被注释为
React$Element
流中的React子元素被注释为
React$Element
正是我的问题!我想弄明白这件事,真是疯了。升级到immutable rc2也解决了这个问题。这对我们来说是问题的正确来源,但immutable 4有很多来自immutable 3的突破性变化,我们还没有准备好。你知道如何使用现有的不可变3流定义而不出现这个错误吗?这正是我的问题!我想弄明白这件事,真是疯了。升级到immutable rc2也解决了这个问题。这对我们来说是问题的正确来源,但immutable 4有很多来自immutable 3的突破性变化,我们还没有准备好。关于如何使用现有的不可变3流定义而不出现此错误,有什么想法吗?