I'm newbie in React. I try to make a project with price calculator which is prepared in 2 languages. Everything is based on Factory Pattern. To change language I used i18next framework.Static text elements on website change dynamically and everything works fine.Problem is when I try change to another language object logo.text stay the same. I know that useState render once so how can i use useEffect? or is another solution to solve render problem ? I put few elements to calculate in array of objects in useState. Looks something like this:
const [logo, setLogo] = useState([
{
type: "tocheck",
checked: false,
name: "rights",
text: t("rightsLogo.text"),
price: 200,
},])