@@ -19,7 +19,7 @@ By doing this the State gets automatically bound to the Agile Instance it was cr
1919const MY_STATE = App .createState (" Hello World" );
2020```
2121There 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.
2323``` ts
2424const MY_STATE = new State (App , " Hello World" );
2525```
@@ -38,7 +38,7 @@ MY_STATE.undo().set("Hello Hell").watch(() => {}).reset().invert().persist().typ
3838
3939## 📭 Props
4040
41- ` State ` takes, beside the initial value an optional configuration object.
41+ A ` State ` takes, beside the initial value an optional configuration object.
4242``` ts
4343const MY_STATE = App .createState (" myInitialValue" , {
4444 key: " myKey" ,
@@ -56,8 +56,8 @@ export interface StateConfigInterface {
5656```
5757
5858### ` 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,
6161where it automatically uses the ` key ` as persist key.
6262We recommend giving each State an unique ` key ` . It as only advantages.
6363``` ts
@@ -74,9 +74,9 @@ Gets mostly used internal and has properly no use for you.
7474
7575:::
7676
77- ` Dependents ` is used to detect States, that depend on this State.
77+ Here we define which States depend on our State.
7878This 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.
8080``` ts
8181const MY_STATE = App .createState (" myInitialValue" , {
8282 dependents: [MY_STATE_2 ]
@@ -91,8 +91,8 @@ Gets mostly used internal and has properly no use for you.
9191
9292:::
9393
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.
9696``` ts
9797const MY_STATE = App .createState (" myInitialValue" , {
9898 isPlaceholder: true
@@ -112,4 +112,4 @@ Javascript users can also get rudimentary typesafe, with the `type` function.
112112``` ts
113113MY_STATE .type (String ); // Now State only accept State Values
114114```
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