5 javascript reactjs react-i18next
这是我的代码:
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;
Run Code Online (Sandbox Code Playgroud)
我收到以下错误:Cannot find module 'react-i18next'。
关于如何修复它有什么想法吗?谢谢你!
归档时间: |
|
查看次数: |
16412 次 |
最近记录: |