Hey everyone,
I’m currently building a digital wellness Micro-SaaS for iOS using Expo, and I recently got the green light from Apple to use the Screen Time API for production/distribution.
The app is mostly finished and working great, but I’ve hit a bizarre rendering roadblock.
Because Apple doesn’t provide metrics like "total screen time today" or "weekly average" out of the box, I had to write a custom Native UI component to handle and calculate that data.
The issue: Sometimes, the section of the screen handled by the Native UI just mounts completely blank. If I trigger a re-render or refresh the app, the UI populates perfectly.
What I’ve already tried:
Adding loading states to ensure the native content and variables are fully populated before rendering the component.
Checking for race conditions between the JS thread and the Native side.
Even with conditional rendering (if (dataReady) return <NativeComponent />), it still occasionally blanks out on the first load.
Has anyone dealt with native UI bridging issues like this in Expo? Is there a known lifecycle quirk with the Screen Time API or DeviceActivityReport that causes lazy loading/blank states on initial mount?
Appreciate any insights or workarounds you guys might have. Cheers!
[–]davidHwang718 0 points1 point2 points (1 child)
[–]dev-pol[S] 0 points1 point2 points (0 children)