reflex
reflex copied to clipboard
No strict type checking for indexing with vars
This code shouldnt be allowed but it compiles into a js code that doesnt fail either:
class State(rx.State):
d: list[int] = [1, 2, 3]
@rx.var
def elements(self) -> dict[str, str]:
return {"name": "reflex"}
def index():
return rx.center(
rx.text(State.elements[State.d]),
)