以下代码
const x = (<Trans>Welcome</Trans>);
<helmet><title>{ `${x}` }</title></helmet>
不显示标题=欢迎。它显示标题=对象,对象
因此,我想知道我能否在react-helmet标签内使用react-i18next标签吗?
[头盔内不能有自定义JSX标签。它仅支持所有有效的head标签:title, base, meta, link, script, noscript, and style tags
及其属性。但是,您可以使用i18n的t
函数进行翻译