【问题标题】:react-google-maps : Super expression must either be null or a function, not undefinedreact-google-maps :超级表达式必须为 null 或函数,而不是未定义
【发布时间】:2017-11-02 11:27:12
【问题描述】:

当我只导入 react-google-maps 时,我遇到了这个奇怪的错误(超级表达式必须为 null 或函数,而不是未定义)。有什么想法吗?

import React from 'react';
import { GoogleMap } from 'react-google-maps';

class GoogleMapFlow extends React.Component{
    constructor(props){
        super(props);
    }

    render() {
        return (
            <div>Hello World</div>
        );
    }
}

export default GoogleMapFlow;

【问题讨论】:

  • 你使用的 react 版本是什么?
  • 你解决了吗?我也有同样的问题。

标签: reactjs react-google-maps


【解决方案1】:

我在 react-google-maps 的 9.4.5 版本中遇到了同样的问题,但 react 是 v0.14.8。更新 react 到 16 解决了这个问题。

【讨论】:

  • 我去“反应”:“^15.6.0”,
猜你喜欢
  • 2016-10-07
  • 1970-01-01
  • 1970-01-01
  • 2018-02-19
  • 2017-07-11
  • 2018-01-21
  • 2016-05-05
  • 1970-01-01
  • 2018-01-18
相关资源
最近更新 更多