Hi, using the example from the docs on how to use custom state does not increment the value:
from starlite import Starlite, State, get
class MyState(State):
count: int = 0
def increment(self) -> None:
self.count += 1
@get("/")
def handler(state: MyState) -> dict:
state.increment()
return state.dict()
app = Starlite(route_handlers=[handler])
What am I missing?
Hi, using the example from the docs on how to use custom state does not increment the value:
What am I missing?