Skip to content

withTranslation

withTranslation is a higher-order component. It’s used to wrap the components you want to translate.

Type declaration

const withTranslations: <L extends LanguageCode, K extends object>(
translationProps: CreateTranslationReturn<L, K>,
) => (Component: FC<CreateTranslationReturn<L, K>>) => JSX.Element;