{"id":20206566,"url":"https://github.com/useflyyer/use-next-intl-format","last_synced_at":"2025-08-26T09:13:06.727Z","repository":{"id":43814238,"uuid":"340682001","full_name":"useflyyer/use-next-intl-format","owner":"useflyyer","description":"Super lightweight and zero-dependencies React Hook for creating memoized native instances of Intl for Next.js i18n","archived":false,"fork":false,"pushed_at":"2023-03-15T04:32:09.000Z","size":1979,"stargazers_count":4,"open_issues_count":3,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-08-18T20:45:06.668Z","etag":null,"topics":["flyyer","i18n","intl","nextjs","react","react-hook","typescript"],"latest_commit_sha":null,"homepage":"https://flyyer.io","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/useflyyer.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-02-20T15:04:58.000Z","updated_at":"2022-10-26T02:49:50.000Z","dependencies_parsed_at":"2024-11-14T05:25:08.849Z","dependency_job_id":"fe8d0662-394b-4cac-a5dd-a93da91e1424","html_url":"https://github.com/useflyyer/use-next-intl-format","commit_stats":{"total_commits":26,"total_committers":1,"mean_commits":26.0,"dds":0.0,"last_synced_commit":"45b4a652f12d332b02f03876b375dbe220563dae"},"previous_names":["flayyer/use-next-intl-format"],"tags_count":8,"template":false,"template_full_name":null,"purl":"pkg:github/useflyyer/use-next-intl-format","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/useflyyer%2Fuse-next-intl-format","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/useflyyer%2Fuse-next-intl-format/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/useflyyer%2Fuse-next-intl-format/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/useflyyer%2Fuse-next-intl-format/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/useflyyer","download_url":"https://codeload.github.com/useflyyer/use-next-intl-format/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/useflyyer%2Fuse-next-intl-format/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":272201345,"owners_count":24890979,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-26T02:00:07.904Z","response_time":60,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["flyyer","i18n","intl","nextjs","react","react-hook","typescript"],"created_at":"2024-11-14T05:24:56.637Z","updated_at":"2025-08-26T09:13:05.678Z","avatar_url":"https://github.com/useflyyer.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# use-next-intl-format\n\n[Super lightweight](https://bundlephobia.com/result?p=use-next-intl-format) React Hook for creating memoized native instances of Intl for Next.js i18n\n\n[![NPM](https://img.shields.io/npm/v/use-next-intl-format.svg)](https://www.npmjs.com/package/use-next-intl-format)\n\n## Note\n\nDo you need this library? **Probably not**, use it only if you need to have the same `formatter` per render for optimization reasons.\n\nIf that is not your case, fallback to:\n\n```tsx\nimport { useRouter } from \"next/router\";\n\nfunction Page() {\n  const router = useRouter()\n  const formatter = new Intl.DateTimeFormat(router.locale, { ... })\n  // ...\n}\n```\n\n## Install\n\nThis module includes Typescript typings.\n\n```bash\nnpm install --save use-next-intl-format\n\nyarn add use-next-intl-format\n```\n\n## Supported Intl helpers\n\n* [`DateTimeFormat`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat) — via `useIntlDateTimeFormat`\n* [`RelativeTimeFormat`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat) — via `useIntlRelativeTimeFormat`\n* [`NumberFormat`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat) — via `useIntlNumberFormat`\n* [`PluralRules`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/PluralRules) — via `useIntlPluralRules`\n* [`DisplayNames`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DisplayNames) — via `useIntlDisplayNames`\n* [`ListFormat`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat) — via `useIntlListFormat`\n* [`Segmenter`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Segmenter/Segmenter) — via `useIntlSegmenter`\n\n## Usage\n\n\u003e See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat#using_options for `options` reference\n\n\u003e See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat#using_options for `options` reference\n\n**This only applies for Next.js apps.**\n\n```tsx\nimport * as React from 'react'\n\nimport { useIntlDateTimeFormat, useIntlNumberFormat } from 'use-next-intl-format'\n\n// Prefer stable values.\nconst DATE_OPTIONS: Intl.DateTimeFormatOptions = {\n  year: \"numeric\",\n  month: \"long\",\n  day: \"numeric\",\n};\n\nconst Example = () =\u003e {\n  const dateFormatter = useIntlDateTimeFormat(DATE_OPTIONS);\n\n  const [numberFormatterOptions] = useState({ notation: \"compact\" });\n  const numberFormatter = useIntlNumberFormat(numberFormatterOptions)\n\n  return (\n    \u003cdiv\u003e\n      Current datetime: {dateFormatter.format(new Date())}\n      Number: {numberFormatter.format(2)}\n    \u003c/div\u003e\n  )\n}\n```\n\n## License\n\nMIT © [lopezjurip](https://github.com/lopezjurip)\n\n---\n\nThis hook is created using [create-react-hook](https://github.com/hermanya/create-react-hook).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fuseflyyer%2Fuse-next-intl-format","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fuseflyyer%2Fuse-next-intl-format","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fuseflyyer%2Fuse-next-intl-format/lists"}