Hi I've built an aiohttp app which functions as an autonomous system running periodic tasks & returns json & text responses for getting status of operations & supports receiving triggers for tasks using various GET, PUT & POST requests.

eg. I have implemented a GET request for retrieving the current running list of tasks as a json response

I want to use a reactjs UI as a frontend that consumes my aiohttp app's requests. This react app would be like an admin panel for the aiohttp app.

**I see there are two architectural options here -**

**option1.** embed the react app into the aiohttp app's codebase & have aiohttp/gunicorn serve the whole project as one server

**option2**. separate aiohttp backend with react frontend

Rather than have aiohttp serve the static files & html for the react app, I want to implement logical separation of concerns by running the reactjs app on a separate docker container with the following **expected behaviour**

1. if aiohttp API endpoint is down & react app is up -

react app shows "backend not available" in UI components that depend on & pull data from an API implemented in the aiohttp backend

2. if both aiohttp & react are up, the react app should be able to periodically call various aiohttp handlers it needs to populate the UI components with data & show a responsive UI

This would also help the react frontend integrate with other rest APIs in my stack (eg docker) so I can build a complete admin interface for my whole stack

I was not able to find a succint example that helps me implement a react frontend with lazy loading for such an application (also need to understand if this can be made to work with push requests where the aiohttp app calls the react app to avoid a poll)

I am a complete newbie in the JS world but have done a lot of work on python, asyncio & aiohttp 

**Questions -**

1. have i chosen a robust option (option 2) & are there some known/common issues 
that I could have avoided with option 1?
2. Please help me with a simple step by step example or a working code repo of how to build a react frontend for my app without having to change my aiohttp handlers too much
3. Can i add functionality to my aiohttp app whereby it can call the react app for submitting status updates vs. waiting for the react app to call the UI in the next poll

i'm sure the questions expose my level of ignorance about how this stuff works. Any help is really appreciated