Skip to content

Commit c5676e6

Browse files
committed
f
1 parent 16fc245 commit c5676e6

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

samples/tutorial/Tutorial1.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,8 @@ The core responsibility of a workflow is to provide a complete rendering / view
164164
every time the related application state updates.
165165
Let's go into the `WelcomeWorkflow` now, and have it return a `WelcomeScreen` from the `render` method.
166166
167+
While you're here, opt out of persistence by making `snapshotState` return `null`.
168+
167169
```kotlin
168170
object WelcomeWorkflow : StatefulWorkflow<Unit, State, Output, WelcomeScreen>() {
169171

@@ -180,7 +182,8 @@ object WelcomeWorkflow : StatefulWorkflow<Unit, State, Output, WelcomeScreen>()
180182
)
181183
}
182184

183-
// …
185+
186+
override fun snapshotState(state: State): Snapshot? = null
184187
}
185188
```
186189

0 commit comments

Comments
 (0)