You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
One pain point of mine about Textual magic methods like on_*, watch_*, and compute_* is that they are not refactoring-friendly. For example, while renaming a reactive variable using IDE refactoring features, the watch_* and compute_* methods cannot be covered, and I have to rename them manually.
The @on annotation is perfectly for solving this problem for event handlers: while designing a new event for my widget, renaming the event class no longer requires searching for all the relevant on_* methods and renaming them manually.
It would be great if we can have @watch and @compute annotations to replace watch_* and compute_* magic methods.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
One pain point of mine about Textual magic methods like
on_*
,watch_*
, andcompute_*
is that they are not refactoring-friendly. For example, while renaming areactive
variable using IDE refactoring features, thewatch_*
andcompute_*
methods cannot be covered, and I have to rename them manually.The
@on
annotation is perfectly for solving this problem for event handlers: while designing a new event for my widget, renaming the event class no longer requires searching for all the relevanton_*
methods and renaming them manually.It would be great if we can have
@watch
and@compute
annotations to replacewatch_*
andcompute_*
magic methods.Beta Was this translation helpful? Give feedback.
All reactions