@@ -565,22 +565,22 @@ createStateMachine {
565
565
}
566
566
```
567
567
568
- `DataState`' s `data` field is set and might be accessed only while the state is active. When ` DataState ` is activated it
569
- requires data value from a `DataEvent `. You can use `lastData` field to access data after state exit, it falls back
568
+ `DataState`' s `data` field is set and might be accessed only while the state is active. At the moment when ` DataState `
569
+ is activated it requires data value from a `DataEvent `. You can use `lastData` field to access last data value even after state exit, it falls back
570
570
to `defaultData` if provided or throws.
571
571
572
572
### Corner cases of `DataState ` activation
573
573
574
574
1 . Implicit activation. `DataState ` might be activated by `Event ` (not `DataEvent `) that is targeting its child state.
575
- In this case `data` field of `DataState ` is assigned by `lastData` field.
575
+ In this case `data` field of `DataState ` is assigned with `lastData` field value .
576
576
If state is activating the first time `lastData` falls back to `defaultData` if provided, otherwise exception is
577
577
thrown.
578
- 2 . Activation by `undo()` of `UndoEvent `. This works same way as for transition that was undone .
578
+ 2 . Activation by `undo()` of `UndoEvent `. This works same way as undone transition.
579
579
3 . Activation by `FinishedEvent `. `FinishedEvent ` may contain non- null data field. `DataState ` receives this data
580
580
if its type matches. `DataExtractor ` class is responsible for matching. Such transition might be created only by
581
581
`transitionConditionally()` function.
582
- 4 . Activation by non data event. This should not be necessary, but it might be done same way as in case 3 . Using
583
- custom `DataExtractor ` you can pass any data from any event type to `DataState `.
582
+ 4 . Activation by non data event. This should not be necessary, but it might be done manually, same way as in case 3 .
583
+ Using custom `DataExtractor ` you can pass any data from any event type to `DataState `.
584
584
585
585
## Arguments
586
586
0 commit comments