Skip to content
This repository was archived by the owner on Feb 15, 2025. It is now read-only.

Commit 7a9afb8

Browse files
committed
fixed typos
1 parent eda1842 commit 7a9afb8

File tree

3 files changed

+59
-10
lines changed

3 files changed

+59
-10
lines changed

docs/packages/core/features/collection/Introduction.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -269,8 +269,8 @@ which gives us much more freedom in configuring them.
269269
<br/>
270270

271271
#### `key`
272-
The name/key is an optional property that is used to identify a specific Collection.
273-
Such key is pretty useful during debug sessions or if we persist our Collection,
272+
The `key/name` is an optional property that is used to identify the Collection later.
273+
Such `key` is pretty useful during debug sessions or if we [persist](./Methods.md#persist) our Collection,
274274
it automatically uses the Collection `key` as persist key.
275275
We recommend giving each Collection a unique `key`, since it has only advantages.
276276
```ts

docs/packages/core/features/collection/group/Introduction.md

Lines changed: 50 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,56 @@ MY_GROUP.value; // Returns '[1, 2, 3]'
103103
```
104104

105105
### `config`
106-
TODO
106+
107+
Beside the initial îtemKeys a `Collection` takes an optional configuration object.
108+
```ts
109+
const MY_GROUP = MY_COLLECTION.createGroup([1, 2, 3], {
110+
key: "myGroup",
111+
});
112+
```
113+
Here is a Typescript Interface for quick reference. However,
114+
each property is explained in more detail below.
115+
```ts
116+
export interface GroupConfigInterface {
117+
key?: GroupKey;
118+
isPlaceholder?: boolean;
119+
}
120+
```
121+
122+
<br/>
123+
124+
#### `key`
125+
The `key/name` is an optional property that is used to identify the Group later.
126+
Such `key` is pretty useful during debug sessions or if we [persist](../../state/Methods.md#persist) our Group,
127+
it automatically uses the Group `key` as persist key.
128+
We recommend giving each Collection a unique `key`, since it has only advantages.
129+
```ts
130+
const MY_GROUP = MY_COLLECTION.createGroup([1, 2, 3], {
131+
key: "myKey"
132+
});
133+
```
134+
135+
<br/>
136+
137+
#### `isPlaceholder`
138+
139+
:::warning
140+
141+
This property is mainly thought for internal use.
142+
143+
:::
144+
145+
With `isPlaceholder` we tell our Group that it's a placeholder.
146+
Often Groups are `placeholder` when AgileTs needs to hold a reference to it,
147+
although the Group doesn't official exists and hasn't been instantiated yet.
148+
```ts
149+
const MY_STATE = App.createState("myInitialValue", {
150+
isPlaceholder: true
151+
});
152+
153+
MY_STATE.exists(); // false
154+
```
155+
107156

108157
## 🟦 Typescript
109158

docs/packages/core/features/state/Introduction.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -95,9 +95,9 @@ export interface StateConfigInterface {
9595
<br/>
9696

9797
#### `key`
98-
The `key/name` is an optional property that serves to identify a State later.
99-
A key is pretty useful during debug sessions or if we [persist](./Methods.md#persist) our State.
100-
Then, it automatically uses the `key` as persist-key, and we don't have to pass a separate one.
98+
The `key/name` is an optional property that is used to identify the State later.
99+
Such `key` is pretty useful during debug sessions or if we [persist](./Methods.md#persist) our State,
100+
it automatically uses the State `key` as persist key.
101101
We recommend giving each State a unique `key`, since it has only advantages.
102102
```ts
103103
const MY_STATE = App.createState("myInitialValue", {
@@ -109,9 +109,9 @@ const MY_STATE = App.createState("myInitialValue", {
109109

110110
#### `dependents`
111111

112-
:::info
112+
:::warning
113113

114-
Mainly used internally and has properly no use for you.
114+
This property is mainly thought for internal use.
115115

116116
:::
117117

@@ -128,9 +128,9 @@ const MY_STATE = App.createState("myInitialValue", {
128128

129129
#### `isPlaceholder`
130130

131-
:::info
131+
:::warning
132132

133-
Mainly used internally and has properly no use for you.
133+
This property is mainly thought for internal use.
134134

135135
:::
136136

0 commit comments

Comments
 (0)