Skip to content

Commit aa62296

Browse files
committed
Update README
1 parent 49b881c commit aa62296

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

README.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ async def report_count(current_count: int, action: str):
9494
9595
### 4. Client Logic (In-Browser Python)
9696
97-
Define the interactivity. We use `@app.startup` to restore state when the page loads, and `@app.client` to handle user interactions.
97+
Define the interactivity. We use `@app.startup` to restore state when the page loads.
9898
9999
```python
100100
@app.startup
@@ -111,7 +111,11 @@ async def init_counter():
111111
if saved_count is not None:
112112
Document.find("display").text = str(saved_count)
113113
print(f"Restored count: {saved_count}")
114+
```
115+
116+
And we use `@app.client` to handle user interactions and run Python code in the browser. Check out the Pythonic API for interacting with the DOM and the LocalStorage. We can also call server-side functions seamlessly, via automagic RPC (Remote Procedure Call).
114117
118+
```python
115119
@app.client
116120
async def handle_change(event: Event):
117121
"""
@@ -225,8 +229,7 @@ We are currently in v1.0 (Core). Here is the vision for the immediate future of
225229
226230
## 🤝 Contribution
227231
228-
`violetear` is open-source and we love contributions\!
229-
Check out the [Design Philosophy](https://www.google.com/search?q=docs/design.md) to understand our "Unopinionated" and "Zero-Dependency Core" approach.
232+
`violetear` is open-source and we love contributions!
230233
231234
1. Fork the repo.
232235
2. Install dependencies with `uv sync`.

0 commit comments

Comments
 (0)