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

Commit b40fbba

Browse files
committed
fixed typos
1 parent c72486a commit b40fbba

File tree

3 files changed

+30
-23
lines changed

3 files changed

+30
-23
lines changed

docs/main/Introduction.md

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,11 @@ Write minimalistic, boilerplate-free code that captures your intent.
3939

4040
**Some straightforward syntax examples:**
4141

42+
- Mutate and Check States with simple Functions
43+
```ts
44+
MY_STATE.undo(); // Undo latest change
45+
MY_STATE.is({hello: "jeff"}); // Check if State has the Value '{hello: "jeff"}'
46+
```
4247
- Store State in any Storage, like [Local Storage](https://www.w3schools.com/html/html5_webstorage.asp)
4348
```ts
4449
MY_STATE.persist("storage-key")
@@ -49,11 +54,6 @@ Write minimalistic, boilerplate-free code that captures your intent.
4954
MY_COLLECTION.collect({id: 1, name: "Frank"});
5055
MY_COLLECTION.collect({id: 2, name: "Dieter"});
5156
```
52-
- Mutate and Check States with simple Functions
53-
```ts
54-
MY_STATE.undo(); // Undo latest change
55-
MY_STATE.is({hello: "jeff"}); // Check if State has the Value '{hello: "jeff"}'
56-
```
5757

5858
### 🤸‍ Flexible
5959

@@ -69,13 +69,13 @@ The benefit of keeping logic separate to UI-Components is to make your code more
6969
### 🎯 Easy to Use
7070

7171
Learn the powerful tools of AgileTs in a short amount of time. An excellent place to start are
72-
our [Quick Start](./Installation.md) Guides, or if you are no fan of following any tutorial, check out
73-
the [Example](../examples) section.
72+
our [Quick Start](./Installation.md) Guides, or if you are no fan of following any tutorial,
73+
jump straight into our [Example](../examples) section.
7474

7575

7676
## ⏳ Quick Example
7777

78-
Instead of talking too much about the advantages of AgileTs, we should start coding.
78+
Instead of talking too much about the benefits of AgileTs, let's start programming.
7979

8080
### 😎 Our first State
8181

@@ -109,6 +109,11 @@ Test AgileTs yourself. It's only one click away. Just select your preferred Fram
109109

110110
More examples can be found in the [Example](../examples/Indroduction.md) Section.
111111

112+
## 👨‍💻 When use AgileTs
113+
114+
AgileTs is thought to handle the business logic and logic in general that isn't explicitly bound to a Component of your application.
115+
So you should use AgileTs if you have to handle any global State and logic that you want to manage at a central place.
116+
112117
## 👨‍🏫 Learn AgileTs
113118

114119
We have a variety of resources available to help you learn AgileTs. An excellent place to start are

docs/main/StyleGuide.md

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ my-app
3232
.
3333
```
3434
We use the `core` of a simple TODO application to visually illustrate how such a `core` can be constructed.
35-
Our todo application has two main [Entities](#📁-entities), that AgileTs can handle.
35+
Our todo application has two main [Entities](#📁-entities), that AgileTs should handle.
3636
The **User** and of course, the **TODO-Item**. These two parts are mapped in our `core`.
3737
```js title="TodoList-Core"
3838
core
@@ -88,7 +88,7 @@ Our `core` consists of several entities, which exist apart from each other, havi
8888
Each `Entity` manages its Data separately by doing rest calls or mutating States. This separation makes our `core` more
8989
structured, readable and improves maintainability.
9090

91-
**For instance:** <br />
91+
**For example:** <br />
9292
The _User Entity_ should only treat the user's whole logic and shouldn't do rest calls, for instance, for the _Todo Entity_.
9393

9494
### 📝 index.ts
@@ -111,13 +111,15 @@ export default {
111111

112112
### 📝 .action.ts
113113

114-
An action does handle the logic of our Entity. We should name the actions after action names like `createX`, `removeY`.
115-
In general, an action modifies the `State`, makes rest calls through the functions provided by the [route.ts](#-routets) file
116-
, and computes some values if necessary.
114+
Here all actions of the Entity are listed.
115+
In general, an action modifies the `State`, makes rest calls (through the functions provided by the [route.ts](#-routets) file),
116+
and computes some values if necessary.
117117
In principle, actions always happen in response to an event. For example, if the add todo button got clicked.
118+
Therefore, they should be called after action sounding names. For instance `createTodo`, `removeTodo`.
118119

119-
**For instance:** <br />
120-
The creation of a Todo-Item in the UI-Layer triggers the `addTodo()` action, which then mutates our State and makes rest calls.
120+
**For example:** <br />
121+
The creation of a Todo-Item in the UI-Layer triggers the `addTodo()` action,
122+
which then mutates our TodoItems State and makes a rest call to add the todo to our backend.
121123

122124
```ts title="todo.action.ts in 📁todo"
123125
import {TodoInterface} from './todo.interface';
@@ -138,8 +140,8 @@ export const addTodo = async (userId: string, description: string): Promise<void
138140

139141
### 📝 .controller.ts
140142

141-
The Controller manages and represents the Agile Sub Instance like States, Collections, .. for the Entity.
142-
These Agile Sub Instances might get modified by the [action.ts](#📝-.action.ts) or bound to a Component in the UI-Layer.
143+
The `controller.ts` manages and represents the Agile Sub Instance (like States, Collections, ..) for an Entity.
144+
These Agile Sub Instances might get modified by the actions in the [action.ts](#📝-.action.ts) or bound to a Component in the UI-Layer.
143145
```ts title="todo.controller.ts in 📁todo"
144146
import {App} from '../../app';
145147
import {TodoInterface} from './todo.interface';
@@ -165,7 +167,7 @@ The `interface` section can be ignored by non [Typescript](https://www.typescrip
165167
If you are a [Typescript](https://www.typescriptlang.org/) user, you properly want to create some interfaces for your Entity.
166168
These interfaces belonging to this Entity should be defined here.
167169

168-
**For instance** <br />
170+
**For example** <br />
169171
In case of the TODO-Entity, it contains the `TodoInterface`.
170172

171173
```ts title="todo.interface.ts in 📁todo"
@@ -181,7 +183,7 @@ export interface TodoInterface {
181183

182184
In order to communicate to our server, we have to create [rest calls](https://en.wikipedia.org/wiki/Representational_state_transfer).
183185
For better maintainability, these rest calls are outsourced from the [action.ts](#-actionts) and provided by this section in function shape.
184-
The routes should only be used in the [action.ts](#-actionts) of the Entity.
186+
These route functions should only be used in the [action.ts](#-actionts) of the Entity.
185187
It's not recommended calling them from outside the corresponding Entity.
186188
```ts title="todo.route.ts in 📁todo"
187189
import {TodoInterface} from "./todo.interface";
@@ -205,7 +207,7 @@ export const ADD_TODO = async (payload: AddTodoPayloadInterface): Promise<TodoIn
205207
In the `app` file, we create our main `Agile Instance` and configure it to meet our needs.
206208
For example, we determine here with which UI framework AgileTs should work together.
207209
States, Collections, etc. can then be created with the help of this instance.
208-
**It's not recommended to have multiple `Agile Instances` in one application!!**
210+
**It's not recommended having multiple `Agile Instances` in one application!!**
209211

210212
```ts title="app.ts"
211213
import {Agile} from "@agile-ts/core";
@@ -216,8 +218,8 @@ export const App = new Agile({logJobs: true}).use(reactIntegration);
216218

217219
## 📝 index.ts
218220

219-
Here we export our `core` entities so that each entity can be reached without any detours.
220-
In our UI-Layer we than simply import our `core` and can mutate entities like the Todo-Entity (`core.todo.addTodo(/* */)`)
221+
Here we export our `core` Entities so that each Entity can be reached without any detours.
222+
In our UI-Layer we than simply import our `core` and can mutate Entities like the Todo-Entity (`core.todo.addTodo(/* */)`)
221223
without further thinking.
222224
```ts title="index.ts"
223225
import todo from "./controllers/todo";

docs/quick_start/React.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ values={[
3737
</TabItem>
3838
</Tabs>
3939

40-
If you've planned to start a project from scratch using AgileTs, feel free to use the AgileTs `react-template`.
40+
If you want start a project from scratch using AgileTs, feel free to use the AgileTs `react-template`.
4141
This template will automatically generate a fully functional react-app with AgileTs installed.
4242
Otherwise, you can install the `core` and `react` package directly in your existing application.
4343

0 commit comments

Comments
 (0)