this.getNativeComponent undefined error and Cannot read property ‘bubblingEventTypes’ of null tell you how to fix in Fabric
还没有人认领这个 Issue。
评估
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 新手友好度
- 48/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 冷清
- 技术栈
- react-native, typescript
- 领域
- mobile-dev
调研方向
Start by reproducing the iOS Google Maps case with React Native 0.76.0 and react-native-maps 1.23.8 using the MapView sample. Inspect src/MapMarker.tsx and the provider-related MapView usage, then verify the reported errors are resolved without editing node_modules directly.
由索引模型根据 Issue 内容生成。
描述
Summary
I meet the problem about this.getNativeComponent undefined error and ‘bubblingEventTypes’ of null when i use RN/0.76.0 and react-native-maps v1.23.8, it take me long time to fix, i will share how to fix them here now!
Reproducible sample code
<MapView
ref={mapRef}
mapType={'standard'}
zoomControlEnabled={true}
style={{ ...StyleSheet.absoluteFillObject }}
// provider={PROVIDER_GOOGLE}
initialRegion={{
latitude,
longitude,
latitudeDelta: delta,
longitudeDelta: delta,
}}
>
Steps to reproduce
RN/0.76.0
react-native-maps v1.23.8
Expected result
First, you will meet the problem ‘bubblingEventTypes’ of null.
You only to deleted provider in
<MapView
ref={mapRef}
mapType={'standard'}
zoomControlEnabled={true}
style={{ ...StyleSheet.absoluteFillObject }}
// provider={PROVIDER_GOOGLE}
initialRegion={{
latitude,
longitude,
latitudeDelta: delta,
longitudeDelta: delta,
}}
>
Second, you will meet the problem this.getNativeComponent undefined error.
Go to the file node_modules/react-native-maps/src/MapMarker.tsx
// getNativeComponent!: () => NativeComponent; //deleted
That it all, you will work fine!
Actual result
if you have any other problem you can tell me.
React Native Maps Version
1.23.8
What platforms are you seeing the problem on?
iOS (Google Maps)
React Native Version
0.76.0
What version of Expo are you using?
Not using Expo
Device(s)
iphone 16
Additional information
No response
- 主要语言
- TypeScript
- 星标
- 16k
- 派生
- 5k
- 平均合并
- 17 小时 45 分钟
- 30 天内合并 PR
- 2
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
react-native-maps/react-native-maps 的其他 Issue
-
难度 1/5 1-3 小时 新手友好度 88/100
-
难度 2/5 1-3 小时 新手友好度 88/100
-
难度 1/5 1 小时以内 新手友好度 90/100
-
难度 2/5 1-3 小时 新手友好度 78/100
-
难度 2/5 1-3 小时 新手友好度 84/100
react-native-maps/react-native-maps#5987 · 1 条评论 ·
查看 react-native-maps/react-native-maps 的全部 Issue
相似的 Issue
-
blocklist removal
难度 2/5 1-3 小时 新手友好度 65/100
MetaMask/eth-phishing-detect#296544 ·
-
难度 2/5 1-3 小时 新手友好度 70/100
pastelsky/bundlephobia#1122 ·
-
难度 2/5 1-3 小时 新手友好度 70/100
-
category/development priority/P2 scope/file-operations scope/testing type/enhancement
难度 2/5 1-3 小时 新手友好度 75/100
-
难度 2/5 1-3 小时 新手友好度 75/100