expo rn app init

This commit is contained in:
Dennis Fruehbrodt
2026-08-11 17:28:47 +02:00
parent 2e095abb9d
commit f1a8c9c1ec
43 changed files with 10431 additions and 0 deletions
+21
View File
@@ -0,0 +1,21 @@
import { useEffect, useState } from 'react';
import { useColorScheme as useRNColorScheme } from 'react-native';
/**
* To support static rendering, this value needs to be re-calculated on the client side for web
*/
export function useColorScheme() {
const [hasHydrated, setHasHydrated] = useState(false);
useEffect(() => {
setHasHydrated(true);
}, []);
const colorScheme = useRNColorScheme();
if (hasHydrated) {
return colorScheme;
}
return 'light';
}