An open API service indexing awesome lists of open source software.

https://github.com/jennasys/pyuseref

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

parcel python react transcrypt tutorial

Last synced: 2 months ago
JSON representation

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

Awesome Lists containing this project

README

        

## [React to Python](https://pyreact.com)
### 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