Skip to content

Commit

Permalink
fix typo in basics section comment (#1191)
Browse files Browse the repository at this point in the history
adhami3310 authored Jan 28, 2025
1 parent 401da58 commit 42432f7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/getting_started/basics.md
Original file line number Diff line number Diff line change
@@ -278,7 +278,7 @@ class BadState(rx.State):
def count_if_even():
return rx.box(
rx.heading("Count: "),
# This will raise a compile error, as MyState.count is a var and not known at compile time.
# This will raise a compile error, as BadState.count is a var and not known at compile time.
rx.text(BadState.count if BadState.count % 2 == 0 else "Odd"),
# Using an if statement with a var as a prop will NOT work either.
rx.text("hello", color="red" if BadState.count % 2 == 0 else "blue"),
@@ -293,7 +293,7 @@ class BadState(rx.State):

def loop_over_list():
return rx.box(
# This will raise a compile error, as MyState.items is a list and not known at compile time.
# This will raise a compile error, as BadState.items is a list and not known at compile time.
*[rx.text(item) for item in BadState.items]
)
```

0 comments on commit 42432f7

Please sign in to comment.