Skip to content

Commit

Permalink
warn for old wait usage (#1255)
Browse files Browse the repository at this point in the history
  • Loading branch information
adrai authored Feb 16, 2021
1 parent 90c003c commit 13c72c7
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/useTranslation.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ export function useTranslation(ns, props = {}) {
return retNotReady;
}

if (i18n.options.react && i18n.options.react.wait !== undefined)
warnOnce('It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.');

const i18nOptions = { ...getDefaults(), ...i18n.options.react, ...props };
const { useSuspense } = i18nOptions;

Expand Down

0 comments on commit 13c72c7

Please sign in to comment.