textual-reactive-programming
Installation
SKILL.md
Textual Reactive Programming
Purpose
Implement efficient, declarative data binding in Textual widgets using reactive attributes. This pattern eliminates manual refresh calls and ensures UI stays synchronized with state.
Quick Start
from textual.reactive import reactive
from textual.widgets import Static
class CounterWidget(Static):
"""Widget with reactive counter."""
count = reactive(0) # Reactive attribute initialized to 0
def render(self) -> str:
"""Auto-called when count changes."""
return f"Count: {self.count}"
Related skills