File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -278,7 +278,7 @@ class BadState(rx.State):
278278def count_if_even ():
279279 return rx.box(
280280 rx.heading(" Count: " ),
281- # This will raise a compile error, as MyState .count is a var and not known at compile time.
281+ # This will raise a compile error, as BadState .count is a var and not known at compile time.
282282 rx.text(BadState.count if BadState.count % 2 == 0 else " Odd" ),
283283 # Using an if statement with a var as a prop will NOT work either.
284284 rx.text(" hello" , color = " red" if BadState.count % 2 == 0 else " blue" ),
@@ -293,7 +293,7 @@ class BadState(rx.State):
293293
294294def loop_over_list ():
295295 return rx.box(
296- # This will raise a compile error, as MyState .items is a list and not known at compile time.
296+ # This will raise a compile error, as BadState .items is a list and not known at compile time.
297297 * [rx.text(item) for item in BadState.items]
298298 )
299299```
You can’t perform that action at this time.
0 commit comments