Code to demo browser warning when multiple react query apps are on 1 page.
Download the repo and cd
into it.
- Create Virtual Environment
python3 -m venv demo_venv
- Activate Environment
source demo_venv/bin/activate
- Install Django dependencies
pip install -r requirements.txt
- Install Frontend dependencies
npm i
- Build Frontend dependencies
npm start
- Start Django Django server
python3 manage.py runserver
Navigate to http://127.0.0.1:8000/.
The page should load without errors. Check browser console for warnings.
Note: Files of interest
templates/frontend/index.html
- template with entry point for 2 appsassets/src/js/index.js
- React Query app 1assets/src/js/index2.js
- React Query app 2