unstale

npm / react-i18next

react-i18next

What changed in react-i18next 16 to 17, from its official release notes, upgrade guides and advisories. Sources checked 2026-10-19.

15 breaking1 security4 deprecations60 new APIs and options3 performance25 behavior and defaults3 tooling74 fixes and other

See which of these apply to your code, ranked, in your agent:

npx @unstale/cli init

@unstale/cli 0.2.0 on npm

react-i18next 17149 changes

Breaking changes 14

  • Explicit values now take precedence over interpolation.defaultVariables in IcuTrans and Trans, matching t().

    17.0.21release notes

  • The minimum i18next peer dependency is now >=26.0.1, affecting compatible versions used with react-i18next.

    17.0.1release notes

  • With the new context API, callers using translate.getWrappedInstance must call instance.getWrappedInstance().getWrappedInstance() instead.

    17.0.0release notes

  • Changing language no longer triggers Suspense by default; adding languageChanging to bindI18n restores the previous behavior.

    17.0.0release notes

  • The I18n render prop was renamed to NamespacesConsumer, which controls which namespaces should be consumed.

    17.0.0release notes

  • Translate HOC overrides must be set under the child react option in i18next init rather than at the top level.

    17.0.0release notes

  • Removed the react-context ponyfill; applications using React below 16.3.0 must polyfill react.createContext themselves.

    17.0.0release notes

  • The TypeScript type for the Trans component's prop is stricter.

    17.0.0release notes

  • HTML tags not included in transKeepBasicHtmlNodesFor are no longer replaced in translation strings.

    17.0.0release notes

  • Trans no longer adds a parent div by default; set react.defaultTransParent to configure a parent element.

    17.0.0release notes

  • Correctly preserves HTML tag names when children contain interpolations or mixed content; update translation files if you rely on auto-generated keys containing indexed tags.

    17.0.0release notes

  • Removed the option to set translateFuncName in the translate HOC.

    17.0.0release notes

  • Initial values are applied only in useSSR and withSSR on cloned i18next instances, not on serverside instances that are not clones.

    17.0.0release notes

  • The translate HOC was renamed to withNamespaces, which controls which namespaces should be loaded.

    17.0.0release notes

Deprecations 3

  • The Babel macro is deprecated in favour of using IcuTrans directly; it continues to work on Babel 7 and is not removed.

    17.0.21release notes

  • A development-only warning logged once appears before useTranslation suspends while translations load, naming a <Suspense> boundary or react.useSuspense: false as fixes.

    17.0.10release notes

  • The Resources type definition is deprecated in favor of CustomTypeOptions.

    17.0.0release notes

New APIs and options 54

  • Adds an entry point with types for using IcuTrans in React Server Components without creating a React context on load.

    17.0.21release notes

  • A TypeScript option was introduced to support React 18 types for the Trans component.

    17.0.0release notes

  • bindI18n, bindI18nStore, and useSuspense defaults can be overridden through useTranslation options or HOC props.

    17.0.0release notes

  • Configure bindI18n as false or as a string of events to control which i18next events trigger updates.

    17.0.0release notes

  • bindI18nStore, alongside bindI18n and useSuspense, can be overridden through useTranslation options or HOC props.

    17.0.0release notes

  • Added bindI18nStore event options so applications can listen to store changes.

    17.0.0release notes

  • Configure bindStore as false or as a string of events to control which store events trigger updates.

    17.0.0release notes

  • The Interpolate component accepts a className.

    17.0.0release notes

  • CustomTypeOptions was introduced for TypeScript configuration, and the Resources type definition was deprecated.

    17.0.0release notes

  • nsSeparator was added to CustomTypeOptions.

    17.0.0release notes

  • withTranslation accepts a forwardedRef prop from outside, independently of the withRef option.

    17.0.0release notes

  • The translate wrapper exposes getWrappedInstance().

    17.0.0release notes

  • Added hashTransKey for custom key generation when Trans has no key and the source value is not wanted as the key.

    17.0.0release notes

  • Added I18n as a render-props alternative to the translate HOC.

    17.0.0release notes

  • The translate HOC accepts an i18next instance via props, allowing developers to provide the instance directly.

    17.0.0release notes

  • Added I18nContext and its provider and consumer for React's new context API.

    17.0.0release notes

  • The i18n instance and defaults can be set with i18next.use(reactI18nextModule), making I18nextProvider obsolete.

    17.0.0release notes

  • Added I18nextProvider for passing an i18n instance through context.

    17.0.0release notes

  • This marker allows Trans to create the correct missing string for dynamically rendered lists.

    17.0.0release notes

  • I18nextProvider accepts initialI18nStore to support simpler server-side rendering.

    17.0.0release notes

  • I18nextProvider accepts initialLanguage to support simpler server-side rendering.

    17.0.0release notes

  • keyPrefix support was added to useTranslation and has type-safe support, including deep prefixes.

    17.0.0release notes

  • Added nsMode: 'fallback' to use namespaces passed to the translate HOC as fallbacks.

    17.0.0release notes

  • Added options.react.exposeNamespace to expose the namespace on data-i18next-options for editor consumption.

    17.0.0release notes

  • The Interpolate component can use raw HTML.

    17.0.0release notes

  • Added a Babel macro exporting Trans, Plural, and Select for using ICU-format components in JSX.

    17.0.0release notes

  • Added react.defaultTransParent to configure a parent element for Trans, including for backwards-compatible wrapping.

    17.0.0release notes

  • Added a configurable parent element for the Trans component.

    17.0.0release notes

  • Set react.useSuspense to false on i18next.init to avoid using Suspense.

    17.0.0release notes

  • Added reportNS to I18NextProvider to report used namespaces.

    17.0.0release notes

  • Universal apps and server-side rendering are supported.

    17.0.0release notes

  • Trans supports an option to unescape HTML.

    17.0.0release notes

  • An option lets developers change the name of the t function.

    17.0.0release notes

  • The Trans component accepts a context prop.

    17.0.0release notes

  • The Trans component accepts ns to override the namespace supplied by a render prop or HOC.

    17.0.0release notes

  • Added tOptions to Trans to support ICU.

    17.0.0release notes

  • TranslationProps includes the useSuspense option.

    17.0.0release notes

  • The Plural component in macros has a values field.

    17.0.0release notes

  • Added Trans for translating nested components, including interpolation, as one translatable string.

    17.0.0release notes

  • Added i18next.options.react.transEmptyNodeValue to set a default fallback value for empty nodes and allow the i18next fallback flow.

    17.0.0release notes

  • Added translate.setDefaults to override default translate HOC options, including translateFuncName.

    17.0.0release notes

  • Added the Translation render prop for use with hooks.

    17.0.0release notes

  • The translate HOC now passes down tReady so applications can show a placeholder while translations load instead of returning null.

    17.0.0release notes

  • A custom unescape function can be added.

    17.0.0release notes

  • Added the usePureComponent option.

    17.0.0release notes

  • useSSR adds namespaces to the i18next initialization options.

    17.0.0release notes

  • useSuspense can be enabled or disabled at hook or component level.

    17.0.0release notes

  • The hook accepts an i18n instance, allowing callers to wrap it with a useContext-enabled hook.

    17.0.0release notes

  • UseTranslationOptions includes the useSuspense configuration property.

    17.0.0release notes

  • The wait option delays initial rendering until translations are loaded.

    17.0.0release notes

  • Added a context-consuming HOC that adds i18n and t to component props without the extra options of withNamespaces.

    17.0.0release notes

  • The withTranslation HOC supports the keyPrefix option.

    17.0.0release notes

  • The HOC exposes the wrapped component as a WrappedComponent property.

    17.0.0release notes

  • The translate wrapper exposes a WrappedComponent property.

    17.0.0release notes

Performance 3

  • The ESM package metadata now declares sideEffects: false, allowing bundlers to remove unused exports and reduce bundle size.

    17.0.21release notes

  • No longer unsubscribes and resubscribes i18n listeners on every render, reducing churn for frequently re-rendering mounted components.

    17.0.17release notes

  • Redundant re-rendering in I18nextProvider is avoided.

    17.0.0release notes

Behavior and default changes 23

  • IcuTrans and IcuTransWithoutContext now infer the literal i18nKey, so props that depend on the key are checked against that key rather than all namespace keys.

    17.1.0release notes

  • With i18next's parseInterpolation set to 'icu' or 'mf2', values on IcuTrans and IcuTransWithoutContext are typed from the message of i18nKey; other settings retain Record<string, any>.

    17.1.0release notes

  • When enabled, the default unescape now converts &nbsp; and &#160; to U+00A0, preserving no-break spacing in text.

    17.0.18release notes

  • The selector-form keyPrefix overload is now available when enableSelector is 'strict', so selector-based key prefixes no longer resolve to the legacy signature.

    17.0.13release notes

  • The Trans values prop now requires only interpolation variables for the specific i18nKey, rather than all variables in the namespace.

    17.0.2release notes

  • Namespace loading moves to did mount.

    17.0.0release notes

  • Non-React static properties are hoisted onto the wrapper.

    17.0.0release notes

  • Hooks bind reportNS to the i18n instance, making namespace reporting per request.

    17.0.0release notes

  • Trans supports named interpolation elements supplied as an object in the components prop, including self-closing tags.

    17.0.0release notes

  • Trans can interpolate self-closing tags supplied through the components prop.

    17.0.0release notes

  • Trans allows br, strong, and i tags in translations.

    17.0.0release notes

  • Trans parses before interpolating.

    17.0.0release notes

  • Trans uses count from the values object when supplied; otherwise it uses the prop.

    17.0.0release notes

  • The ICU Trans macro parses defaults as an alternative to children.

    17.0.0release notes

  • Trans allows p elements.

    17.0.0release notes

  • Interpolation values can be taken from content or from count and values props, and count is automatically replaced in the translation string.

    17.0.0release notes

  • Interpolated values no longer need extra pseudo tags in translation strings; existing strings with those tags continue to work.

    17.0.0release notes

  • Trans can be used without children and returns the translated string.

    17.0.0release notes

  • Translation now forwards the ready state.

    17.0.0release notes

  • Warnings for unmatched interpolation variables are conditional.

    17.0.0release notes

  • Translations are reloaded whenever the namespaces passed to useTranslation change.

    17.0.0release notes

  • withTranslation uses forwardRef.

    17.0.0release notes

  • withTranslation now forwards the ready state.

    17.0.0release notes

Tooling 2

  • TypeScript support for keyPrefix is type-safe, including deep key prefixes.

    17.0.0release notes

  • The context prop of Trans has TypeScript support.

    17.0.0release notes

Fixes and other changes 50

  • With useSuspense enabled, the hook checks the store after starting a namespace load and suspends only if the namespace is still missing, avoiding fallback flashes with synchronous backends.

    17.0.20release notes

  • With an inline selector keyPrefix, the cached t now keeps its identity while the resolved prefix stays the same, avoiding repeated effects and memo recalculations.

    17.0.19release notes

  • The cached t is no longer reused when the namespace or i18n instance changes on a mounted component.

    17.0.19release notes

  • Selector i18nKey values targeting a secondary namespace now resolve like t() when Trans receives a t with its own namespace and no explicit ns prop.

    17.0.16release notes

  • Empty paired component tags preserve a single valid React-element child supplied through a named component map, component array, or indexed JSX children, matching behavior for multiple children and self-closing tags.

    17.0.15release notes

  • The i18n object returned by useTranslation now refreshes when resolvedLanguage or languages changes, so components no longer receive a stale snapshot.

    17.0.14release notes

  • When i18nKey is not provided, IcuTrans now uses defaultTranslation as the key, preventing key-less ICU macro nodes from rendering an empty string.

    17.0.12release notes

  • The parser used by Trans fixes handling of literal < in text, multiline/CRLF attribute values, comments containing >, doctypes, and quote-aware brackets.

    17.0.11release notes

  • The development-mode check is guarded so runtimes without a process global stay silent instead of throwing.

    17.0.10release notes

  • The missing-i18next-instance warnings for useTranslation and Trans now explain props/context alternatives and duplicate react-i18next copies; the Trans warning points to initReactI18next.

    17.0.10release notes

  • The ns prop now accepts a single namespace from an array-typed Ns, allowing the described Trans usage to typecheck under TypeScript 7; the change also applies to TransSelectorProps and IcuTransWithoutContextProps.

    17.0.9release notes

  • The optional TypeScript peer dependency range now allows TypeScript 7, preventing an ERESOLVE peer conflict during npm install.

    17.0.9release notes

  • The Trans component now typechecks selector-function i18nKey values under enableSelector: 'strict'.

    17.0.8release notes

  • With multiple namespaces, selector calls using a secondary-namespace prefix now resolve correctly under the default nsMode; plain key lookups remain isolated to the primary namespace.

    17.0.7release notes

  • Indexed <N> placeholders nested inside a keep-tag are scoped to that tag’s original React children, correcting rendering while preserving the nodesToString format consumed by i18next-cli’s extractor.

    17.0.6release notes

  • Fixes child rendering when a kept HTML node wraps a non-keep React element.

    17.0.5release notes

  • Avoids the React warning that i18nIsDynamicList is not recognized on a DOM element.

    17.0.4release notes

  • Avoids passing an invalid prop to React.Fragment inside <Trans />.

    17.0.3release notes

  • Fixed cimode so it loads and becomes ready.

    17.0.0release notes

  • Passing i18n as a prop no longer triggers the required context type warning.

    17.0.0release notes

  • The provider supports passing defaultNS via a prop.

    17.0.0release notes

  • I18nextProvider supports the defaultNS prop.

    17.0.0release notes

  • useTranslation can replace the i18n instance in the provider.

    17.0.0release notes

  • Loaded namespaces are triggered only when the component is mounted.

    17.0.0release notes

  • Updating the ns prop on the I18n component now loads missing namespaces.

    17.0.0release notes

  • Support for nsMode values default and fallback was restored.

    17.0.0release notes

  • You can pass ready when i18next is not initialized yet if initialStore is set.

    17.0.0release notes

  • Added and removed i18next resource events are handled.

    17.0.0release notes

  • Trans children types explicitly support objects.

    17.0.0release notes

  • The components prop accepts const components.

    17.0.0release notes

  • Trans takes the namespace from the supplied t function.

    17.0.0release notes

  • Trans supports basic HTML nodes when checking arrays.

    17.0.0release notes

  • Trans supports nested components rendered from list.map, and i18nIsDynamicList produces a correct missing string.

    17.0.0release notes

  • Trans handles misleading overloaded empty elements in components.

    17.0.0release notes

  • Trans ignores null children.

    17.0.0release notes

  • Trans supports uppercase elements.

    17.0.0release notes

  • The Trans component correctly returns defaultValue.

    17.0.0release notes

  • The Trans component's TypeScript interface accepts React Native props.

    17.0.0release notes

  • The parent prop accepts ComponentType, and Trans accepts HTML props.

    17.0.0release notes

  • Trans accepts HTML props, and the parent prop type was fixed.

    17.0.0release notes

  • Trans correctly passes interpolation options supplied through the tOptions prop.

    17.0.0release notes

  • TypeScript definitions now make children optional in TransProps.

    17.0.0release notes

  • Basic HTML node support works with self-closing Trans components.

    17.0.0release notes

  • The React 15.2 update eliminates the Unknown Prop Warning.

    17.0.0release notes

  • Language changes trigger Suspense by listening to languageChanging; remove it from bindI18n to avoid suspending during a language change.

    17.0.0release notes

  • The translation function t is reset when the namespace changes.

    17.0.0release notes

  • The ready flag is false when the i18n instance has not been initialized.

    17.0.0release notes

  • The ready parameter is included in the Translation component's TypeScript definition.

    17.0.0release notes

  • The hook's return value can be destructured with object spread syntax.

    17.0.0release notes

  • Only pass forwardedRef to children if options.withRef is false.

    17.0.0release notes

react-i18next 1636 changes

Breaking changes 1

  • The peer dependency requirement is now >= 25.10.9 to provide type exports used by TransSelector.

    16.6.6release notes

Security 1

  • When a selector function cannot be resolved without an i18n instance, it returns an empty string instead of leaking the raw function reference.

    16.5.8release notes

Deprecations 1

  • A warning is emitted when t is called before ready with useSuspense: false.

    16.6.0release notes

New APIs and options 6

  • useTranslation accepts selector functions as keyPrefix with full type-safe key narrowing when enableSelector is enabled.

    16.6.2release notes

  • The i18nKey prop of <Trans> now accepts a SelectorKey.

    16.6.1release notes

  • Exports nodesToString with runtime and TypeScript typings to support i18next-cli.

    16.5.1release notes

  • Adds a configuration option to set default props for the Trans component, such as tOptions, shouldUnescape, and values.

    16.5.0release notes

  • The IcuTrans component is now exported.

    16.1.1release notes

  • Introduces the IcuTrans component.

    16.1.0release notes

Behavior and default changes 2

  • The values prop now infers interpolation variables from the translation string when custom types are configured.

    16.6.0release notes

  • The count prop is optional and can be inferred from children.

    16.4.0release notes

Tooling 1

Fixes and other changes 24

  • The selector keyPrefix overload no longer matches when keyPrefix is absent, fixing defaultNS: false with an explicit ns option.

    16.6.5release notes

  • Merged TransSelector overloads into a single signature so typeof Trans remains extendable.

    16.6.3release notes

  • Fixed <Trans> with enableSelector: true not supporting multiple selectors for fallbacks.

    16.5.7release notes

  • When init() hasn't been called before useSSR, it now logs a warning instead of throwing.

    16.5.6release notes

  • useSSR, getInitialProps and Translation no longer crash when no i18next instance is available; they log a clear warning instead.

    16.5.5release notes

  • Fixed overriding React component props not working.

    16.5.4release notes

  • Fixes handling of named tags with underscores in Trans.

    16.5.3release notes

  • Fixes type errors when you've declared a resources type.

    16.5.2release notes

  • Interpolated values in component props are unescaped before being passed to React, preventing double-escaped rendered output.

    16.4.1release notes

  • Fixes a runaway effect in useTranslation.

    16.3.5release notes

  • Avoids the "ref is not a prop" warning when a user ref is placed on an element inside <Trans>.

    16.3.4release notes

  • Improves useTranslation to fix "Maximum update depth exceeded" while still supporting the new react-compiler.

    16.3.3release notes

  • Avoids the “Uncaught TypeError: Cannot redefine property: __original” error.

    16.3.2release notes

  • Reverts a fix for inconsistent behavior: Trans sets defaultValue when the t call does not set the field.

    16.3.1release notes

  • Adds an i18n wrapper for compatibility with React Compiler and React.memo.

    16.3.0release notes

  • Fixes an issue where hyphened components break.

    16.2.3release notes

  • Fixes the Trans component breaking when its content includes a less-than sign.

    16.2.2release notes

  • Fixed a regression so bindI18nStore works correctly.

    16.2.1release notes

  • Attempts to address conditional calls to inner hooks that violate React's rules of hooks.

    16.2.0release notes

  • Fixes handling of spread props for inner components in Trans (icu).

    16.1.6release notes

  • Trans uses defaultValue from tOptions as a fallback when the t call does not set the field, making its behavior consistent with t.

    16.1.5release notes

  • Fixes detection of pre-transformation interpolation use, including number and date formatting.

    16.1.4release notes

  • Invalid identifiers are quoted in the props object.

    16.1.3release notes

  • Adds missing .js extensions to Icu imports.

    16.1.2release notes