I have a component where I have imported both i18next and react-i18next:
import i18next from 'i18next'
import { Trans } from 'react-i18next'
I am trying to use Trans with other translations in the component:
<H1>{i18next.t('confirmed.header')}</H1>
<p>{i18next.t('confirmed.text')}</p>
<p>{i18next.t('confirmed.support')}</p>
<p><Trans i18nKey="confirmed.bookMore"/></p>
But, I get an error:
Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: undefined. You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports. (, :)
I wanted to use Trans component so that I could pass the link to it. The translation looks like this:
bookMore: 'Would you like more?'
If I use any other key page gets rendered without errors, I don't get why I am only getting an error on this key?