Answer the question
In order to leave comments, you need to log in
i18n translation utility?
In the project I created a utility to which I pass the text and it returns the translation The
question is - will a new function t be created with each call?
import { useTranslation } from 'react-i18next';
export default data => {
const { t } = useTranslation();
return t(data);
};
import { useTranslation } from 'react-i18next';
const { t } = useTranslation();
export default data => {
return t(data);
};
Answer the question
In order to leave comments, you need to log in
The question is - will a new function t be created with each call?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question