UNPKG

@react-navigation/native

Version:

React Native integration for React Navigation

18 lines (16 loc) 492 B
"use strict"; import * as React from 'react'; import { LocaleDirContext } from "./LocaleDirContext.js"; /** * Hook to access the text direction specified in the `NavigationContainer`. */ export function useLocale() { const direction = React.useContext(LocaleDirContext); if (direction === undefined) { throw new Error("Couldn't determine the text direction. Is your component inside NavigationContainer?"); } return { direction }; } //# sourceMappingURL=useLocale.js.map