Skip to content

How to store state in App? #4107

Answered by davep
chbndrhnns asked this question in Q&A
Feb 2, 2024 · 1 comments · 5 replies
Discussion options

You must be logged in to vote

This breaks typing information as no part of the application is aware of that additional attribute.

Your app is simply a Python class, so you can "declare" that attribute as you generally would with any other Python class: create/assign/type the attribute in __init__ (just like you did in your State class).

Replies: 1 comment 5 replies

Comment options

You must be logged in to vote
5 replies
@chbndrhnns
Comment options

@davep
Comment options

Answer selected by chbndrhnns
@daddycocoaman
Comment options

@davep
Comment options

@daddycocoaman
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants