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

Commit 74c436f

Browse files
committed
fixed some typos
1 parent 13dc6c2 commit 74c436f

File tree

2 files changed

+16
-7
lines changed

2 files changed

+16
-7
lines changed

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

+11-6
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,12 @@ By doing this the Collection gets automatically bound to the Agile Instance it w
2020
const MY_COLLECTION = App.createCollection();
2121
```
2222
There is also a way to use the plain `Collection Class`,
23-
but there we have to pass the `Agile Instance`, to which the Collection should get bound, beside the config.
23+
but there we have to pass the `Agile Instance`, to which the Collection should get bound.
2424
```ts
2525
const MY_COLLECTION = new Collection(App);
2626
```
2727
Both instantiations lead to the same result, but we recommend using the former one.
28-
After we have successfully created our first Collection, we can start using its powerful tools of it.
28+
After we have successfully created our first Collection, we can start using its powerful features.
2929
```ts
3030
MY_COLLECTION.collect({id: 1, name: "jeff"}); // Add Item to Collection
3131
MY_COLLECTION.remove(1).everywhere(); // Remove Item from Collection
@@ -38,12 +38,17 @@ MY_COLLECTION.collect({id: 1, name: "jeff"}).persist().removeGroup('myGroup').re
3838

3939
### 🔨 Usage
4040

41-
We might use a Collection, if we want to have an array of Todo Objects or Posts Objects.
41+
We might use a Collection, if we need a flexible array of Todo Objects.
4242
```ts
4343
const TODOS = App.createCollection();
44-
TODOS.collect({id: 1, todo: "Clean bathroom"});
45-
TODOS.collect({id: 2, todo: "Write Agile docs"});
44+
TODOS.collect({id: 1, todo: "Clean bathroom"}, ["user1", "todayTodos"]);
45+
TODOS.collect({id: 2, todo: "Write Agile docs"}, ["user1"]);
46+
// <- cleand bathroom
47+
TODOS.remove(1).everywhere();
4648
```
49+
Here we create a `TODO` Collection and add two todos to it, which both get stored in the `user1` [Group](./group/Introduction.md).
50+
Beside the `user1` Group the todo with the id 1 gets also stored in the `todayTodos` Group.
51+
After we have successfully cleaned our bathroom, we remove the todo related to the id 1.
4752

4853
### ⛳️ Sandbox
4954
Test the Collection yourself, it's only one click away. Just select your preferred Framework below.
@@ -55,7 +60,7 @@ Test the Collection yourself, it's only one click away. Just select your preferr
5560

5661
Each Data Object we add to our Collection, for example with the `collect` method,
5762
gets transformed to an Item. This Item than gets stored in our Collection.
58-
We can simply access each Item with the `getItem` method and the correct primary Key.
63+
We can simply access each Item with the `getItem` method and the fitting `primary Key`.
5964
```ts
6065
MY_COLLECTION.getItem(/* primary Key */); // Returns Item at the primary Key
6166
```

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

+5-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ but there we have to pass the `Agile Instance`, to which the State should get bo
2424
const MY_STATE = new State(App, "Hello World");
2525
```
2626
Both instantiations lead to the same result, but we recommend using the former one.
27-
After we have successfully created our State, we can start using its powerful tools of it.
27+
After we have successfully created our State, we can start using its powerful features.
2828
```ts
2929
MY_STATE.set("Hello There"); // Set State Value to "Hello There"
3030
MY_STATE.undo(); // Undo latest change
@@ -40,7 +40,11 @@ MY_STATE.undo().set("Hello Hell").watch(() => {}).reset().invert().persist().typ
4040
We might use a State, if we want to remember the theme of our application or the logged in userId.
4141
```ts
4242
const THEME_TYPE = App.createState("dark");
43+
// <- toggled theme switch
44+
THEME_TYPE.set("light");
4345
```
46+
Here we create a `THEME_TYPE` State which is initially set to "dark".
47+
After we have toggled the theme switch we, set the THEME_TYPE to "light".
4448

4549
### ⛳️ Sandbox
4650
Test the State yourself, it's only one click away. Just select your preferred Framework below.

0 commit comments

Comments
 (0)