Quantcast
Channel: Active questions tagged react-native+typescript - Stack Overflow
Viewing all articles
Browse latest Browse all 6287

i18Next React Native enum translation issue

$
0
0

Passing the t on the enum value is not working it givings an error.

 enum catSize {    SMALL = 'Small', //works    MEDIUM = 'Medium', //works    LARGE = 'Large', //works}enum catSize {    SMALL = t('sizes.small'), //error    MEDIUM = t('sizes.medium'), //error    LARGE = t('sizes.large'),} 

Gives the following error:Computed values are not permitted in an enum with string valued members.ts(2553)


Viewing all articles
Browse latest Browse all 6287

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>