未捕获的类型错误:无法使用 react/redux 读取未定义错误的属性“map”

时间:2021-01-08 00:43:02

标签: reactjs redux

我在respondMessage.jxs中有以下行导致标题错误

return this.props.replies.map((reply, index) => {

此处调用此行:

case responseTypesConfig.respondMessage:
      return( 
        <div>
           <RespondMessagesContainer  //this container is causing trouble  
        replies={this.props.respondMessages} //respondMessages is present in propTypes and works for other cases
        sendMessage={this.props.sendMessage}
          />
          </div>

//容器:

RespondMessagesContainer.propTypes = {
    replies: responsePropTypes.respondMessages,
    sendMessage: PropTypes.func.isRequired,
    tabIndex:PropTypes.number.isRequired
};

有关容器未定义原因的任何帮助将不胜感激。 如果还需要其他信息,请评论,谢谢

0 个答案:

没有答案