(Edit: I found something else wrong with the code and fixed it. So this question becomes irrelevant.)
How to re-render the MyComponent component when const language changes? Now it works only when I switch the tabs, but I need it working when the language is changed in another component.
import React from "react";
import {useSelector} from "react-redux";
export default function MyComponent(props: any) {
const language: string = useSelector((state: any) => state.config.language);
......
}