Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/milochen0418/reflex-call-browser-js
https://github.com/milochen0418/reflex-call-browser-js
Last synced: 9 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/milochen0418/reflex-call-browser-js
- Owner: milochen0418
- Created: 2023-07-17T19:06:35.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-07-18T08:32:54.000Z (over 1 year ago)
- Last Synced: 2024-04-23T22:08:33.775Z (7 months ago)
- Language: Python
- Size: 14.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# reflex-call-browser-js
### Run the early version
The early version could use the following way to setup.
Make sure to install `reflex==0.2.0`
```bash
pip install -r requirements.txt
```### Run the latest version
Or you can use the following `codna` way to run your code in
the latest source code of reflex.
(The terminal in the VSCode sometimes is unstable, so please use the pure Terminal app)```
git clone https://github.com/reflex-dev/reflex
cd reflex
conda create -n reflex-core python=3.11
conda activate reflex-core
pip install poetry
poetry install
mkdir examples
cd examples
git clone https://github.com/milochen0418/reflex-call-browser-js
cd reflex-call-browser-js
reflex init
reflex run
```## Explain
We rewrite window.alert in the frontend.
So that we have a easy way to verify our frontend code has the ability to call browser-side js.
Then we can start to make a new special event in the reflex framework to support something like
`call_browser_js`This small project makes for solving step 2 for this issue.
- https://github.com/reflex-dev/reflex/issues/1346
YouTube Demo is here https://www.youtube.com/watch?v=_gfbeOXPD6g