类型错误:Object(...)不是函数
./node_modules/react-leaflet/es/context.js node_modules/react-leaflet/es/context.js:8
// $FlowFixMe: import
forwardRef } from 'react';
var _createContext = createContext({}), // This line fails
Consumer = _createContext.Consumer,
Provider = _createContext.Provider;
createContext
调用自 https://github.com/PaulLeCam/react-leaflet/blob/master/src/context.js#L14而且react-leaflet
至少需要react ^16.3.0
和react-dom ^ 16.3.0
,请参见 https://github.com/PaulLeCam/react-leaflet/blob/master/package.json#L59-L60 - Alex Baumgertner