aşağıdaki hata var bu şekildeBir bileşenin reaksiyon bağlamında bir pervane tanımlamak için akış tipi nasıl kullanılır?
// @flow
type MyType = Object;
class CustomView extends React.Component {
static childContextTypes = {
someProp: MyType
}
getChildContext() {
return {
someProp: this.props.someProp
};
}
}
yılında context bir pervane tanımlamak için flowtype kullanarak:
YaniCustomView: type specification of child context
someProps
is invalid; the type checker function must returnnull
or anError
but returned a object. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).
propTypes.object
yerine
Object
kullanmak zorundayım.