Skip to content

Commit 349a519

Browse files
committed
[docs] Update info about buildCreationArguments method
1 parent 564ac2d commit 349a519

File tree

4 files changed

+5
-4
lines changed

4 files changed

+5
-4
lines changed

docs/pages/persistence.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ can be configured with `EventRecordingArguments` properties.
4242

4343
```kotlin
4444
val machine = createStateMachine(
45-
creationArguments = CreationArguments(eventRecordingArguments = EventRecordingArguments())
45+
creationArguments = buildCreationArguments { eventRecordingArguments = buildEventRecordingArguments {} }
4646
) {
4747
// ...
4848
}

docs/pages/statemachine.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,8 @@ val machine = createStateMachine(
3232
```
3333

3434
By default, factory functions start state machine. You can control it using `start` argument.
35-
All overloads accept optional argument `CreationArguments` which allows to change some options.
35+
All overloads accept optional argument `CreationArguments` which allows to change some options.
36+
Use `buildCreationArguments()` function to provide it.
3637

3738
Subsequent samples will use `createStateMachine()` function, but you can choose that one which fits your needs.
3839

docs/pages/states/states.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ block to have a valid state references for transitions.
269269
Keep in mind that states are mutated by machine instance, defining them with `object` keyword (i.e. singleton) often
270270
makes your states live longer than machine. It is common use case when you have multiple similar machines
271271
that are using same singleton states sequentially. Library detects such cases automatically by default
272-
(see `autoDestroyOnStatesReuse` argument of `CreationArguments` structure) and cleans states allowing for future reuse.
272+
(see `autoDestroyOnStatesReuse` property of `CreationArguments` interface) and cleans states allowing for future reuse.
273273
You can disable automatic machine destruction on state reuse, and call `StateMachine.destroy()` manually if required,
274274
or just do not use `object` keyword for defining states.
275275
If you have your own `DefaultState` subclasses that are singletons and has data fields, use

docs/pages/transitions/transitions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@ to previous state (except target-less transitions).
256256
This API might be called as many times as needed.
257257
To implement this feature library stores transitions in a stack, it takes memory,
258258
so this feature is disabled by default and must be enabled explicitly using
259-
`createStateMachine(creationArguments = CreationArguments(isUndoEnabled = true))` argument.
259+
`createStateMachine(creationArguments = buildCreationArguments { isUndoEnabled = true })` argument.
260260
Other words this feature works like stack based FSM.
261261

262262
Undo functionality is implemented as `Event`, so it possible to call `undo()` from notification callbacks, if you use

0 commit comments

Comments
 (0)