Skip to content

Commit bae2b77

Browse files
committed
Improve readme
1 parent a04a130 commit bae2b77

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

README.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,30 @@ REALTIME_DATABASE_URL=https://server-driven-compose-default-rtdb.asia-southeast1
7272

7373
![architecture](figure/arch.png)
7474

75+
### Component Design System
76+
77+
**Server Driven Compose** retrieves all rendering information from the backend (Firebase Realtime Database), allowing the client to focus solely on consuming the layout details. This approach lets you concentrate on "how to do (rendering)" rather than "what to do," a decision typically made by the product manager.
78+
79+
```kotlin
80+
Column(
81+
modifier = Modifier
82+
.background(ServerDrivenTheme.colors.background)
83+
.fillMaxSize()
84+
.padding(12.dp)
85+
.verticalScroll(state = rememberScrollState()),
86+
verticalArrangement = Arrangement.spacedBy(12.dp)
87+
) {
88+
timelineUi.components.forEach { uiComponent ->
89+
uiComponent.Consume(
90+
version = timelineUi.version,
91+
navigator = { clickedComponent ->
92+
navigateToDetails.invoke(clickedComponent, timelineUi.version)
93+
}
94+
)
95+
}
96+
}
97+
```
98+
7599
### Component Versioning
76100

77101
**Server Driven Compose** demonstrates a versioning system for each component and how to synchronize them with the application in real-time.

0 commit comments

Comments
 (0)