From 352816af2f3dc0eb61a45488fde14d01ae954472 Mon Sep 17 00:00:00 2001 From: Marcus Fequiere Date: Sat, 21 Mar 2026 12:48:54 -0400 Subject: [PATCH] fix: swap SafeAreaView from react-native for react-native-safe-area-context (closes #539) React Native's built-in SafeAreaView only works on iOS and doesn't properly handle notches/dynamic islands on all devices. react-native-safe-area-context is already a dependency (used in SafeAreaProvider in layout files) and is the recommended replacement. Updated both base and nativewindui Container.tsx.ejs templates. --- cli/src/templates/base/components/Container.tsx.ejs | 3 ++- .../packages/nativewindui/components/Container.tsx.ejs | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/cli/src/templates/base/components/Container.tsx.ejs b/cli/src/templates/base/components/Container.tsx.ejs index 76faf545..ce22f1bd 100644 --- a/cli/src/templates/base/components/Container.tsx.ejs +++ b/cli/src/templates/base/components/Container.tsx.ejs @@ -1,4 +1,5 @@ -import { StyleSheet, SafeAreaView } from 'react-native'; +import { StyleSheet } from 'react-native'; +import { SafeAreaView } from 'react-native-safe-area-context'; export const Container = ({ children }: { children: React.ReactNode }) => { return {children}; diff --git a/cli/src/templates/packages/nativewindui/components/Container.tsx.ejs b/cli/src/templates/packages/nativewindui/components/Container.tsx.ejs index 76faf545..ce22f1bd 100644 --- a/cli/src/templates/packages/nativewindui/components/Container.tsx.ejs +++ b/cli/src/templates/packages/nativewindui/components/Container.tsx.ejs @@ -1,4 +1,5 @@ -import { StyleSheet, SafeAreaView } from 'react-native'; +import { StyleSheet } from 'react-native'; +import { SafeAreaView } from 'react-native-safe-area-context'; export const Container = ({ children }: { children: React.ReactNode }) => { return {children};