【问题标题】:Why 'handlePost' is not defined?为什么没有定义“handlePost”?
【发布时间】:2020-01-01 05:56:23
【问题描述】:

尝试向我的节点 React 按钮组件添加一个处理程序,以在 DB 中插入一行,但我收到了一个错误,尽管我只是从示例教程中复制代码。怎么了?

【问题讨论】:

    标签: reactjs apollo react-apollo relayjs relay


    【解决方案1】:

    handlePost 方法没有在class Button 中定义。但是您将其指定为this.handlePost。移动class Button中的方法。

    【讨论】:

      猜你喜欢
      • 2016-07-24
      • 2013-08-16
      • 1970-01-01
      • 2018-02-11
      • 2014-02-21
      • 1970-01-01
      • 1970-01-01
      • 2023-01-03
      • 1970-01-01
      相关资源
      最近更新 更多