-
-
Notifications
You must be signed in to change notification settings - Fork 512
Closed
Labels
Documentation 📚This is related to documentationThis is related to documentationHelp Wanted 🆘This is good for people to work onThis is good for people to work on
Description
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?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Documentation 📚This is related to documentationThis is related to documentationHelp Wanted 🆘This is good for people to work onThis is good for people to work on