UNPKG

react-intlayer

Version:

Easily internationalize i18n your React applications with type-safe multilingual content management.

18 lines 447 B
"use client"; import { list } from "@intlayer/core"; import { useCallback, useContext } from "react"; import { IntlayerClientContext } from "../IntlayerProvider.mjs"; const useList = () => { const { locale } = useContext(IntlayerClientContext); return useCallback( (...args) => list(args[0], { ...args[1], locale: args[1]?.locale ?? locale }), [locale] ); }; export { useList }; //# sourceMappingURL=useList.mjs.map