Block Types
Blocks
Rhyme supports several types of blocks, each serving a specific purpose in your app’s architecture.
Flow Blocks
The most common blocks that define screens or states:
[welcome]
.title "Welcome Screen"
.button "Continue" [next]
[next]
.text "Next screen content"
System Blocks
Special blocks with predefined behavior:
[init]
Runs once when the app starts:
[init]
set $app-version = "1.0"
set $theme = "dark"
[start]
The default entry point:
[start]
.title "My App"
.button "Begin" [main]
[error]
Handles errors globally:
[error]
.text "Something went wrong"
.button "Try Again" [start]
Named Blocks
Custom blocks for specific features:
[user-profile]
.title "Profile: $user-name"
.text "Email: $user-email"
.button "Edit" [edit-profile]
More content coming soon…