【问题标题】:Cannot return `<AmplifyContext.Provider />` because property `client` is missing in `React.Element` [1] but exists in `Client`无法返回 `<AmplifyContext.Provider />`,因为 `React.Element` [1] 中缺少属性 `client` 但存在于 `Client` 中
【发布时间】:2019-12-04 21:38:21
【问题描述】:

无法返回&lt;AmplifyContext.Provider /&gt;,因为React.Element 中缺少属性client 1 但存在于Client

如何修复错误?

Try Flow

【问题讨论】:

    标签: flowtype


    【解决方案1】:

    解决方案的方向是使用React.ElementReact.ComponentType 键入返回值。我将解决方案的开头放在一起(打开in flow try),尽管我觉得在client 附近仍然需要更好的打字

    【讨论】:

      猜你喜欢
      • 2018-11-10
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2022-10-09
      • 1970-01-01
      相关资源
      最近更新 更多