Skip to content

feat: add updateInsets public function to uniwind#211

Merged
Brentlok merged 1 commit into
uni-stack:mainfrom
divineniiquaye:fix-02
Dec 8, 2025
Merged

feat: add updateInsets public function to uniwind#211
Brentlok merged 1 commit into
uni-stack:mainfrom
divineniiquaye:fix-02

Conversation

@divineniiquaye

@divineniiquaye divineniiquaye commented Dec 6, 2025

Copy link
Copy Markdown
Contributor

Summary

Introduces an updateInsets method to both common and native UniwindConfigBuilder classes. The native implementation updates runtime insets and notifies listeners, while the common version is a no-op. This prepares the config for dynamic inset management.

Impact

This is to add support for class names using the *-safe. The root layout for a react native app is wrapped with SafeAreaListener from react-native-safe-area-context and called in the onChange prop:

<SafeAreaListener
      onChange={({ insets }) => {
        Uniwind.updateInsets(insets);
      }}
    >
    ...
 </SafeAreaListener>

@Brentlok Brentlok left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Amazing! Thanks for PR, didn't knew that there's some kind of onChange method in react-native-safe-area-context 🚀

@Brentlok Brentlok merged commit c909f2e into uni-stack:main Dec 8, 2025
1 check passed
@divineniiquaye divineniiquaye deleted the fix-02 branch January 23, 2026 18:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants