react-native-safe-area-context
react-native-safe-area-context copied to clipboard
Big lighthouse score impact on web
Finally narrowed this down in my app - this package triggers reflows on mount on the web. I haven't taken the time to track it down yet but will revisit it soon, but figure it's worth tracking.
One test is to see if we can somehow set a css var we can read from:
https://benfrain.com/how-to-get-the-value-of-phone-notches-environment-variables-env-in-javascript-from-css/
Perhaps if set on root it won't trigger style calc.
Yeah - something like calc(env(...) + someProp) would probably work better. See this file - https://github.com/th3rdwave/react-native-safe-area-context/blob/main/src/SafeAreaView.web.tsx#L55
Happy to take a look at PRs and give pointers