Closed sangayt1997 closed 2 years ago
Hello everyone, I just want to pass the translation key for labels.
packages version: "react": "18.1.0", "react-native": "0.70.1", "react-i18next": "^11.18.6", "i18next": "^21.9.2", "react-native-step-indicator": "^1.0.3",
Code: const labels = ['TRANSLATION_KEY_1', 'TRANSLATION_KEY_2', 'TRANSLATION_KEY_3'];
<StepIndicator customStyles={customStyles} currentPosition={1} stepCount={3} labels={t(labels)} />
Error message:
Render Error undefined is not a function
Solution: const labels = [t('TRANSLATION_KEY_1'), t('TRANSLATION_KEY_2'), t('TRANSLATION_KEY_3')];
Hello everyone, I just want to pass the translation key for labels.
packages version: "react": "18.1.0", "react-native": "0.70.1", "react-i18next": "^11.18.6", "i18next": "^21.9.2", "react-native-step-indicator": "^1.0.3",
Code: const labels = ['TRANSLATION_KEY_1', 'TRANSLATION_KEY_2', 'TRANSLATION_KEY_3'];
<StepIndicator customStyles={customStyles} currentPosition={1} stepCount={3} labels={t(labels)} />
Error message:
Render Error undefined is not a function