Here is my code which implements a simple tab navigator. In one of the screens I need to make a request to an API and update the states every time the screen is selected by user