F
F
Farazendasss2020-04-17 15:39:25
React Native
Farazendasss, 2020-04-17 15:39:25

How to update the state of the side menu and header menu?

I am building a mobile app in react native. The application has the functionality of changing the language.
First, when the user enters the application (on the first visit, after installation), he has a screen with a choice of language in front of him, and in the future this choice will be default. And in the settings, he can also change the language.
The functionality has almost been implemented, plain text is translated without problems. But here the text in the navigation is not translated.
For example, the text in the header is translated, but not immediately (the first time you go to the screen, the old text, the second time it's updated).
And with the side drover it's generally a disaster. It only updates after the page is reloaded.
In general, how can I update the navigation? How can I trigger this update?

Maybe you can show the user the loader and at the same time somehow update the state. Or wrap in HOC, but what to wrap?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
Roman Alexandrovich, 2020-04-17
@Farazendasss

https://github.com/react-navigation/react-navigation...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question