# 051: State Declaration
# Reactive variables that trigger UI updates

# Declare reactive state
state count = 0
state username = "Guest"
state is_logged_in = false

# When state changes, UI automatically updates
button "Increment" -> increment()
button "Login" -> login()

increment():
  count = count + 1
  show "Count: {count}"  # UI re-renders automatically

login():
  username = "Alex"
  is_logged_in = true
  show "Welcome, {username}!"

# Regular variables don't trigger UI updates
# State variables do - that's the difference
