import solara @solara.component def MainPage(clicks): color = "green" if clicks.value >= 5: color = "red" def increment(): clicks.value += 1 print("clicks", clicks) # noqa solara.Button(label=f"Clicked: {clicks}", on_click=increment, color=color)