react-native-safe-area-context icon indicating copy to clipboard operation
react-native-safe-area-context copied to clipboard

useSafeAreaFrame doesn't update on device resize (RN Web)

Open SampsonCrowley opened this issue 4 years ago • 3 comments

pretty much what the title says. Is there a way to set a listener so the context triggers updates on device resize for web?

SampsonCrowley avatar Mar 12 '21 00:03 SampsonCrowley

By that I mean is there a refresh function I can call, not that I expect you to support web if you don't already

SampsonCrowley avatar Mar 12 '21 00:03 SampsonCrowley

In the provider, we need to listen to resize events on the window, and update this part:- https://github.com/th3rdwave/react-native-safe-area-context/blob/main/src/NativeSafeAreaProvider.web.tsx#L46-L51

jacobp100 avatar Jan 19 '23 16:01 jacobp100