@@ -19,7 +19,7 @@ By doing this the State gets automatically bound to the Agile Instance it was cr
19
19
const MY_STATE = App .createState (" Hello World" );
20
20
```
21
21
There is also a way to use the plain ` State Class ` ,
22
- but there we have to pass the ` Agile Instance ` , to which the State should get bound, beside the initial Value and config .
22
+ but there we have to pass the ` Agile Instance ` , to which the State should get bound, beside the initial Value.
23
23
``` ts
24
24
const MY_STATE = new State (App , " Hello World" );
25
25
```
@@ -38,7 +38,7 @@ MY_STATE.undo().set("Hello Hell").watch(() => {}).reset().invert().persist().typ
38
38
39
39
## 📭 Props
40
40
41
- ` State ` takes, beside the initial value an optional configuration object.
41
+ A ` State ` takes, beside the initial value an optional configuration object.
42
42
``` ts
43
43
const MY_STATE = App .createState (" myInitialValue" , {
44
44
key: " myKey" ,
@@ -56,8 +56,8 @@ export interface StateConfigInterface {
56
56
```
57
57
58
58
### ` key `
59
- The Key/Name is an optional property, that gets used to identify a State.
60
- This is pretty useful during debug sessions or if we persist a State,
59
+ The Key/Name is an optional property, that gets used to identify our State.
60
+ This is pretty useful during debug sessions or if we persist our State,
61
61
where it automatically uses the ` key ` as persist key.
62
62
We recommend giving each State an unique ` key ` . It as only advantages.
63
63
``` ts
@@ -74,9 +74,9 @@ Gets mostly used internal and has properly no use for you.
74
74
75
75
:::
76
76
77
- ` Dependents ` is used to detect States, that depend on this State.
77
+ Here we define which States depend on our State.
78
78
This means if our State gets mutated and ingested into the Runtime,
79
- the depending State gets also ingested into the Runtime.
79
+ the depending States gets also ingested into the Runtime.
80
80
``` ts
81
81
const MY_STATE = App .createState (" myInitialValue" , {
82
82
dependents: [MY_STATE_2 ]
@@ -91,8 +91,8 @@ Gets mostly used internal and has properly no use for you.
91
91
92
92
:::
93
93
94
- With ` isPlaceholder ` we define, that this State is a placeholder.
95
- Mostly a State is a Placeholder if we want to hold a reference to a State that hasn't been instantiated yet.
94
+ With ` isPlaceholder ` we define, that our State is a placeholder.
95
+ Mostly a State is a Placeholder if we want to hold a reference to it, because hasn't been instantiated yet.
96
96
``` ts
97
97
const MY_STATE = App .createState (" myInitialValue" , {
98
98
isPlaceholder: true
@@ -112,4 +112,4 @@ Javascript users can also get rudimentary typesafe, with the `type` function.
112
112
``` ts
113
113
MY_STATE .type (String ); // Now State only accept State Values
114
114
```
115
- Be aware that the ` type ` function currently only supports primitive types.
115
+ Be aware that the ` type ` function currently only supports primitive types.
0 commit comments