It will useful if we can add a listener for network if the state changes it will trigger the func that we passed in