appandflow / appandflow/react-native-safe-area-context
SafeAreaProvider interfering with native performance measure on Android
- 主要言語
- TypeScript
- スター
- 2.8k
- フォーク
- 258
- 平均マージ
- 3日 1時間
- マージ済み PR(30日)
- 2
説明
### Description
Hello, I've been struggling with this issue on Android, but not on iOS.
I'm trying to use `react-native-performance` to measure the starting time of my app. I'm able to access native start times in my app but as soon as the measurement is triggered from a component contained by `SafeAreaProvider`, I no longer receive any measurements.
I was able to create a minimal reproducible example here:
https://github.com/cgerrard-pass/PerfMRE
What I did in the example above is simply:
- create a react native project with 0.73.11
- create a hook that measures performance
- wrap my app in `SafeAreaProvider`
- see empty logs
If I remove `SafeAreaProvider` from `App.tsx`, the logs contain the measurements and are no longer empty.
```sh
# with SafeAreaProvider
LOG Running "PerfMRE" with {"rootTag":31}
LOG []
LOG []
LOG []
LOG []
# without SafeAreaProvider
LOG Running "PerfMRE" with {"rootTag":31}
LOG []
LOG [
{
"name": "nativeLaunchEnd",
"entryType": "react-native-mark",
"startTime": 21650442,
"duration": 0
}
]
```
I've created another issue on `react-native-performance` but I haven't received any answers.
https://github.com/oblador/react-native-performance/issues/112
I can bump `react-native-safe-area-context` to a more recent version (but before v5) but I don't think it will change anything since I attempted doing that on my other project I'm running into issues with.
Any help would be appreciated! Thank you
### Steps to reproduce
create a react native project with 0.73.11
create a hook that measures performance
wrap my app in SafeAreaProvider
see empty logs
### Snack or a link to a repository
https://github.com/cgerrard-pass/PerfMRE
### Safe Area Context version
3.4.1
### React Native version
0.73.11
### Platforms
Android
### Architecture
None
### Build type
Debug mode
### Device
Android emulator
### Device model
_No response_
### Acknowledgements
Yes
コントリビューションガイド
評価
この issue はまだ評価されていません。