DelacourProvider
Every provider an app needs at its root, in one component.
Installation
DelacourProvider ships with the library — install it once, then import:
import { DelacourProvider } from "@delacour/react-native-ui/provider";Or copy the source into your project, to own and edit it:
bunx delacour@latest add providerUsage
import "@/styles/global.css";
import { DelacourProvider } from "@/components/ui/provider";
import { Stack } from "expo-router";
export default function RootLayout() {
return (
<DelacourProvider>
<Stack screenOptions={{ headerShown: false }} />
</DelacourProvider>
);
}Mount it once, around everything — a root layout, an App.tsx.
Layers
Four, outermost first: GestureHandlerRootView → SafeAreaProvider →
KeyboardProvider → <KeyboardStateSync /> beside the children. An app with a
BottomSheet mounts BottomSheetProvider inside it, from
the sheet's own subpath — the engine is an optional peer, so this component cannot.
The order is load-bearing, and one failure is silent: without the gesture root every Pressable
stops responding — no error, no warning, presses simply stop landing. Nesting a second copy of the
provider breaks the keyboard values the same quiet way, so mount exactly one. The full reasoning is
in Provider.
API Reference
Prop
Type