Update README.md
This commit is contained in:
parent
705557b484
commit
116e54d54c
@ -64,7 +64,7 @@ Now you can modify the source code in my_app_name/my_app_name.py. Pynecone has f
|
|||||||
Let's go over a simple counter app to explore the basics of Pynecone.
|
Let's go over a simple counter app to explore the basics of Pynecone.
|
||||||
|
|
||||||
<div align="center">
|
<div align="center">
|
||||||
<img src="docs/images/Counter.gif" alt="drawing" width="550"/>
|
<img src="docs/images/counter.gif" alt="drawing" width="550"/>
|
||||||
<div align="left">
|
<div align="left">
|
||||||
|
|
||||||
Here is the complete code to create this.
|
Here is the complete code to create this.
|
||||||
@ -73,10 +73,7 @@ Here is the complete code to create this.
|
|||||||
import pynecone as pc
|
import pynecone as pc
|
||||||
import random
|
import random
|
||||||
|
|
||||||
|
|
||||||
class State(pc.State):
|
class State(pc.State):
|
||||||
"""The app state."""
|
|
||||||
|
|
||||||
count = 0
|
count = 0
|
||||||
|
|
||||||
def increment(self):
|
def increment(self):
|
||||||
@ -158,7 +155,6 @@ Our counter app has two event handlers, increment and decrement.
|
|||||||
|
|
||||||
```python
|
```python
|
||||||
def index():
|
def index():
|
||||||
"""The main view."""
|
|
||||||
return pc.center(
|
return pc.center(
|
||||||
pc.vstack(
|
pc.vstack(
|
||||||
pc.heading(State.count),
|
pc.heading(State.count),
|
||||||
|
Loading…
Reference in New Issue
Block a user