这是我的代码
import React from 'react';
import { useTranslation } from 'react-i18next';
function MyComponent() {
const { t, i18n } = useTranslation();
return <p>{t('my translated text')}</p>
}
export default MyComponent;我得到一个错误,无法找到模块'react-i18next‘。如何修复?
发布于 2019-10-01 05:44:17
键入您的控制台npm install react-i18next
您需要安装该模块
https://stackoverflow.com/questions/58175616
复制相似问题