https://dev.to/ziratsu/the-useref-hook-in-react-3h98
-
app.py: useRef demo
-
app_multi.py: multi-ref demo
-
app_state.py: using useState (controlled inputs) instead of useRef for comparison
-
pyreact.py: React wrapper functions
$ python3.9 -m venv venv
$ . ./venv/bin/activate
$ pip install -r requirements.txt
$ npm install
$ npm start
The application will be served up on Parcel's default port at:
http://localhost:1234
Open the developer console in the web browser to see the output.
Change script src
in index.html to try different app modules