@@ -11,11 +11,16 @@ WIP docs!
1111
1212:::
1313
14- The _ Agile Instance_ is created with ` new Agile() ` and should be unique to our application.
14+ The ` Agile Class ` is the foundation of AgileTs,
15+ nearly everything related to AgileTs depends in some kind on it.
1516``` ts
1617const App = new Agile ();
1718```
18- With an instantiated _ Agile Instance_ , we are able to create any Agile Sub Instances like
19+ Each created Agile Instance should be unique to our application,
20+ and we should avoid having multiple from these in one application.
21+ The Agile Instance can be seen as the store, which offers many powerful features
22+ to mutate and work with the stored Instances.
23+ Such Instances can be created with help of the Agile Instance and get automatically stored in it.
1924- [ State] ( ../state/Introduction.md )
2025 ``` ts
2126 const MY_STATE = App .createState (" Hello there" );
@@ -33,10 +38,6 @@ With an instantiated _Agile Instance_, we are able to create any Agile Sub Insta
3338 const MY_EVENT = App .createEvent ();
3439 ```
3540
36- These Sub Instances created with the help of the ` Agile Class ` are automatically bound to it.
37- Because of the storing behaviour, the ` Agile Class ` can also be seen as a Store,
38- that offers many features to mutate and work with the stored Instances.
39-
4041## 📭 Props
4142
4243` Agile ` takes an optional configuration object as its only parameter.
@@ -60,9 +61,11 @@ export interface CreateAgileConfigInterface {
6061
6162### ` logConfig `
6263
63- The logConfig is thought to configure the Logger of AgileTs.
64- For instance, we can configure if we want to log all messages or
65- only warnings. [ Here] ( ../../../../Interfaces.md#createloggerconfig ) you can find all configuration options.
64+ The ` logConfig ` is thought to configure the Logger of AgileTs.
65+ The Agile Logger simply logs important events in the console, like warnings or errors,
66+ but it also logs runtime events if this is desired.
67+ So for instance here we can configure if we want to log all messages or
68+ only warnings.
6669``` ts
6770const App = new Agile ({
6871 logConfig: {
@@ -71,25 +74,29 @@ const App = new Agile({
7174 },
7275});
7376```
77+ To find out more about possible configuration options, checkout the [ CreateLoggerConfigInterface] ( ../../../../Interfaces.md#createloggerconfig ) .
7478
7579
7680### ` localStorage `
7781
78- Defines whether we want to use the Local Storage as default Storage or not.
79- If we use the Local Storage each Agile Sub Instance we persist, gets stored in the Local Storage by default.
80- We aren't limited to the Local Storage, we can configure our own [ Storage] ( ../storage/Introduction.md ) .
81- This is in a Mobile Environment necessary, because there the Local Storage doesn't exist.
82- With ` App.registerStorage() ` we can register our wished [ Storage] ( ../storage/Introduction.md ) .
82+ Defines whether AgileTs creates an interface to the ` localStorage ` for us.
83+ If we have decided to use the local storage, each Agile Sub Instance we
84+ persist, gets stored into the ` localStorage ` by default.
8385``` ts
8486const App = new Agile ({
8587 localStorage: false // default true
8688});
8789```
90+ Of course, we aren't limited to the ` localStorage ` .
91+ We are able to create an Interface to any [ Storage] ( ../storage/Introduction.md ) we want.
92+ For instance is this necessary in the Mobile Environment, because there
93+ the ` localStorage ` doesn't exists. With ` App.registerStorage() ` we can register our own [ Storage] ( ../storage/Introduction.md ) .
8894
8995### ` waitForMount `
9096
91- With ` waitForMount ` we define if AgileTs should wait
92- with causing rerender on an unmounted Component until it got mounted.
97+ With this flag we can determine
98+ whether AgileTs should wait until unmounted
99+ components are mounted before rerendering them.
93100``` ts
94101const App = new Agile ({
95102 waitForMount: false // default true
@@ -99,12 +106,11 @@ const App = new Agile({
99106
100107## 🟦 Typescript
101108
102- ` Agile Class ` is almost 100% typesafe.
109+ The ` Agile Class ` is almost 100% typesafe.
103110
104111## 🗺 Where to instantiate?
105112
106- You can instantiate the Agile Instance where ever you want.
107- Directly in your Component, in an extra File or on Paper.
108- It doesn't matter as long as you can work with it.
109- There are a few [ Style Guides] ( ../../../../main/StyleGuide.md ) where you can get some inspiration
110- how to structure an Application using AgileTs.
113+ We can instantiate the Agile Instance of our application where ever we want.
114+ Directly in our Component, in a separate file or on paper.
115+ It doesn't matter as long as we can work with it.
116+ There are a few [ Style Guides] ( ../../../../main/StyleGuide.md ) which might help us with such hard decision.
0 commit comments