Skip to content

GetState / SetState are not a good idea in the Year of our Lord 2025 #167

@emersonrp

Description

@emersonrp

Back when I had no idea what I was doing, putting access to the various controls behind Page's GetState / SetState seemed like a useful abstraction, but in reality, since GetState can return str|bool|list|dict|Colour|etc, it makes type-checking a complete headache.

Undoing this historical decision would be tangly but would lead to better code in the long run.

Labeling this as "enhancement" but it's arguably "bug".

Edit to add: this one can be fixed piecemeal, removing chunks of GetState() in places a bit at a time. Each improvement will help.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions