reflex site doc is up to date? #6104
Replies: 1 comment
-
|
rx.Field and rx.field are used to provide static type hinting support. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
for example https://reflex.dev/docs/vars/base-vars/
index.py
from .state import TickerState
def ticker_example():
return rx.center(
rx.vstack(
rx.heading(TickerState.ticker, size="3"),
rx.text(
f"Current Price: reflex___state____state__flexdown___modules____a4e3de79f19b87b4f4fce3d5f729c6b6b225d8d968533932d2e49adf411f2694____ticker_state.price_rx_state_",
font_size="md",
),
rx.text("Change: 4%", color="green"),
),
)
is it still recommended to use rx.Field instead of x: bool = False?
import reflex as rx
app = rx.App()
class State(rx.State):
x: rx.Field[bool] = rx.field(False)
@app.add_page
def index():
return rx.vstack(
rx.button("Click me", on_click=State.flip),
rx.text(State.x),
rx.text(~State.x),
)
there is not much resource to learn reflex other than site doc. I want to make sure that site doc is up to date.
Thank you
Beta Was this translation helpful? Give feedback.
All reactions