qiuxiang / react-native-amap3d

react-native 高德地图组件,使用最新 3D SDK,支持 Android + iOS
https://qiuxiang.github.io/react-native-amap3d/api/
MIT License
1.28k stars 327 forks source link

react 18 typescirpt 兼容 #776

Open StarHosea opened 1 year ago

StarHosea commented 1 year ago

这行代码,在 react 18 下,ts 报错 https://github.com/qiuxiang/react-native-amap3d/blob/main/lib/src/cluster/index.tsx#L66

renderCluster?: (params: ClusterParams) => React.ComponentType<any>;

修改为ts构建通过

  renderCluster?: (params: ClusterParams) => React.ReactNode;