JennaSys / pyuseref

Python version of useRef demo at: https://dev.to/ziratsu/the-useref-hook-in-react-3h98

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Python React version of useRef Tutorial at:

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

Setup:

$ python3.9 -m venv venv
$ . ./venv/bin/activate
$ pip install -r requirements.txt
$ npm install

Build and run with:

$ 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

About

Python version of useRef demo at: https://dev.to/ziratsu/the-useref-hook-in-react-3h98


Languages

Language:Python 93.7%Language:HTML 6.3%