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

Commit 6b27b55

Browse files
authored
Merge pull request #77 from agile-ts/develop
Develop
2 parents 103651b + 5d6bc41 commit 6b27b55

File tree

13 files changed

+302
-294
lines changed

13 files changed

+302
-294
lines changed

docs/packages/core/Introduction.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ sidebar_label: Introduction
55
slug: /core
66
---
77

8-
> **Brain of AgileTs**
8+
> Global State and Logic Framework
99
1010
<br />
1111

@@ -22,8 +22,7 @@ slug: /core
2222
## `core`
2323

2424
The `core` is the main package of AgileTs and includes the whole state management logic.
25-
Therefore, it can be seen as the brain of AgileTs that manages all our States.
26-
It includes the main Instance of AgileTs, called [`Agile Class`](./features/agile-instance/Introduction.md).
25+
It contains the main Instance of AgileTs, called [`Agile Class`](./features/agile-instance/Introduction.md).
2726
```ts
2827
const App = new Agile();
2928
```
@@ -36,7 +35,7 @@ In summary, the most important tasks of the `Agile Class` are to:
3635
Each application using AgileTs needs the `core` package
3736
and has to instantiate a `Agile Class` often called `App`.
3837
To get some inspiration where to instantiate the `Agile Class`, check out the [Style Guide](../../main/StyleGuide.md) Section.
39-
Besides the `Agile Class` the `core` holds some other useful classes,
38+
Besides, the `Agile Class` the `core` holds some other useful classes,
4039
which represent the actual features of AgileTs, since the `Agile Class`
4140
is mostly used internally.
4241

docs/packages/core/features/agile-instance/Introduction.md

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,14 @@ WIP docs!
1111

1212
:::
1313

14-
The `Agile Class` is the foundation of AgileTs. Everything related to AgileTs depends on this class in different ways.
14+
15+
The `Agile Class` is the main Instance of AgileTs and should be unique to our application.
1516
```ts
1617
const App = new Agile();
1718
```
18-
It can be seen as your application store, which manages each `Agile Sub Instance` (ASI).
19-
The `Agile Class` doesn't contain these ASI's internally, but each ASI includes a reference to the main `Agile Class`.
20-
For instance, to pass something into the `runtime`.
21-
Here are some Agile Sub Instances (ASI):
19+
It can be seen as our application manager. Each `Agile Sub Instance` (ASI) holds a reference
20+
to the `Agile Class` and depends on its functionalities. <br/>
21+
For reference here are some `Agile Sub Instances` (ASI):
2222

2323
- [State](../state/Introduction.md)
2424
```ts
@@ -36,17 +36,14 @@ Here are some Agile Sub Instances (ASI):
3636
```ts
3737
const MY_EVENT = App.createEvent();
3838
```
39-
40-
These ASI's are created with the help of an `Agile Instance` and get automatically bound to it.
41-
In summary, the main tasks of an instantiated `Agile Class` (Agile Instance) are to:
39+
40+
In summary the main tasks of the `AgileClass` are to:
4241
- manage Agile Sub Instances, like [States](../state/Introduction.md), ..
43-
- ingest changes into the Runtime
42+
- ingest changes into the Runtime (queue system for managing ASI mutations)
43+
- provide configuration object
4444
- trigger rerender on Integrations like [React](../../../react/Introduction.md)
4545
- store values in any [Storage](../storage/Introduction.md)
4646

47-
Be aware that each application using AgileTs needs at least one `Agile Instance`,
48-
but also shouldn't have more, because multiple `Agile Instance` in one application might cause trouble.
49-
5047
## 📭 Props
5148

5249
### `config`

docs/packages/core/features/agile-instance/Methods.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ slug: /core/agile-instance/methods
77

88
:::info
99

10-
Here all methods of the `Agile Instance` are described.
10+
Here are valuable methods of the `Agile Instance` listed.
1111

1212
:::
1313

@@ -53,16 +53,16 @@ which is automatically bound to the [Agile Instance](../agile-instance/Introduct
5353
```ts {1-4,8-13}
5454
const Collection = App.createCollection({
5555
key: 'dummyCollection',
56-
groups: ['myGroup']
56+
groups: ['myGroup']
5757
})
5858

5959
// or
6060

6161
const Collection2 = App.createCollection((collection) => ({
62-
key: 'dummyCollection',
63-
groups: {
64-
myGroup: collection.Group(['item1', 'item2'])
65-
}
62+
key: 'dummyCollection',
63+
groups: {
64+
myGroup: collection.Group(['item1', 'item2'])
65+
}
6666
}))
6767
```
6868

@@ -100,7 +100,7 @@ const Computed = App.createComputed(() => {/* Computed Method */}, [/* hard code
100100
// or
101101

102102
const ComputedWithConfig = App.createComputed(() => {/* Computed Method */}, {
103-
key: 'dummyComputed',
103+
key: 'dummyComputed',
104104
}, [/* hard coded deps */])
105105
```
106106

@@ -166,10 +166,10 @@ Returns a fresh [Event](../event/Introduction.md).
166166
## `integrate()`
167167

168168
With `integrate()` we can integrate any Framework [Integration](../integration/Introduction.md) into AgileTs.
169-
An Integration simply tells AgileTs, howto mutate a particular Component,
169+
An Integration simply tells AgileTs, howto mutates a particular Component
170170
whenever a State changes. To bind States to Components and thus be reactive,
171171
any Framework using AgileTs needs an Integration for AgileTs.
172-
For example, to use AgileTs in a [React](https://reactjs.org/) environment,
172+
For example, to use AgileTs in a [React](https://reactjs.org/) environment,
173173
we have to register a React Integration to AgileTs.
174174
```ts
175175
App.integrate(reactIntegration);
@@ -200,7 +200,7 @@ const reactIntegration = new Integration<typeof React, AgileReactComponent>({
200200
},
201201
});
202202

203-
// Each initialIntegraion gets integrated into AgileTs automatically during initialation
203+
// Each initialIntegraion gets integrated into AgileTs automatically during initialisation
204204
Agile.initialIntegrations.push(reactIntegration);
205205
```
206206

docs/packages/core/features/agile-instance/Properties.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ slug: /core/agile-instance/properties
77

88
:::info
99

10-
Here useful properties of the `Agile Instance` are described.
10+
Here are valuable properties of the `Agile Instance` listed.
1111

1212
:::
1313

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ Most methods we use to modify, mutate and access the Collection are chainable.
3333
MY_COLLECTION.collect({id: 1, name: "jeff"}).persist().removeGroup('myGroup').reset();
3434
```
3535

36-
### 🔨 Usage
36+
### 🔨 Use case
3737

3838
For instance a Collection can be used to remember a flexible array of Todo objects.
3939
```ts

0 commit comments

Comments
 (0)