Check out example codes for "working outside of application context". It will help you in understanding the concepts better.

Code Example 1

# when app is initialized using app_factory

@classmethod
def setUpClass(self):
    self.app = create_app("testing")
    self.client = self.app.test_client()

Learn ReactJs, React Native from akashmittal.com