Skip to contentOpen History to see the last commit
formattingLocale.ts
9 lines250 Bytes
1import { createContext, use } from "react"; 3import { DEFAULT_LOCALE } from "./locales"; 5export const FormattingLocaleContext = createContext(DEFAULT_LOCALE); 7export function useFormattingLocale(): string { 8 return use(FormattingLocaleContext);