reca 0.0.8 → 0.0.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -8,6 +8,7 @@ Created at the intersection of Functional style and OOP technologies. It is base
8
8
  - **Dependency Injection** - override any part of your application for unit test or other customer,
9
9
  - **Microfrontend** - perfect support microfrontends out the box without any boilerplates,
10
10
  - **Simple Data Flow** - don't need search functions call chain for debug your reducers,
11
+ - **Code Organization** - structures the code easily even for large enterprise applications,
11
12
  - **Extra Small Size** - only 1kb of minified code.
12
13
 
13
14
  ## Why not Redux or Flux?
@@ -27,44 +28,249 @@ yarn add reca
27
28
  ```
28
29
 
29
30
  ## Examples
31
+ ### Example AutoStore
30
32
  Create your Store by inheriting from AutoStore, and use it in a component via useStore hook.
31
33
 
32
34
  ``` typescript
33
35
  // todo.store.ts
34
36
  import {AutoStore} from "reca";
37
+ import type {FormEvent} from "react";
35
38
 
36
39
  export class ToDoStore extends AutoStore {
37
40
 
41
+ public currentTodo: string = "";
42
+
38
43
  public todos: string[] = [];
39
44
 
40
- public addTodo (todo: string): void {
41
- this.todos.push(todo);
45
+ public handleAddTodo (): void {
46
+ this.todos.push(this.currentTodo);
47
+ }
48
+
49
+ public handleDeleteTodo (index: number): void {
50
+ this.todos.splice(index, 1);
51
+ }
52
+
53
+ public handleCurrentEdit (event: FormEvent<HTMLInputElement>): void {
54
+ this.currentTodo = event.currentTarget.value;
42
55
  }
43
56
 
44
57
  }
45
58
 
59
+
46
60
  // todo.component.ts
47
61
  import {useStore} from "reca";
48
- import {ToDoStore} from "./todo.store.ts";
62
+ import {ToDoStore} from "../stores/todo.store";
49
63
 
50
64
  export const ToDoComponent = (): JSX.Element => {
51
65
  const store = useStore(ToDoStore);
52
66
 
53
67
  return (
54
- <div>
55
- {store.diService.seed}
68
+ <div className="todos">
69
+ <div className="todos-list">
70
+ {
71
+ store.todos.map((todo, index) => (
72
+ <div className="todo">
73
+ {todo}
74
+
75
+ <button
76
+ className="todo-delete"
77
+ onClick={() => store.handleDeleteTodo(index)}
78
+ type="button"
79
+ >
80
+ X
81
+ </button>
82
+ </div>
83
+ ))
84
+ }
85
+ </div>
86
+
87
+ <div className="todos-input">
88
+ <input
89
+ onInput={store.handleCurrentEdit}
90
+ value={store.currentTodo}
91
+ />
92
+
93
+ <button
94
+ onClick={store.handleAddTodo}
95
+ type="button"
96
+ >
97
+ add
98
+ </button>
99
+ </div>
100
+ </div>
101
+ );
102
+ };
103
+ ```
104
+
105
+ ### Example low-level Store
106
+
107
+ Also, if you need uncompromising performance, you can use the low-level Store. But you will need to start redrawing manually using the `this.redraw()` method. Also you must pass arrow function to all used HTMLElement events, such as onClick.
108
+
109
+ ``` typescript
110
+ // todo.store.ts
111
+ import {Store} from "reca";
112
+ import type {FormEvent} from "react";
113
+
114
+ export class ToDoStore extends Store {
115
+
116
+ public currentTodo: string = "";
117
+
118
+ public todos: string[] = [];
119
+
120
+ public handleAddTodo (): void {
121
+ this.todos.push(this.currentTodo);
122
+ this.redraw();
123
+ }
124
+
125
+ public handleDeleteTodo (index: number): void {
126
+ this.todos.splice(index, 1);
127
+ this.redraw();
128
+ }
129
+
130
+ public handleCurrentEdit (event: FormEvent<HTMLInputElement>): void {
131
+ this.currentTodo = event.currentTarget.value;
132
+ this.redraw();
133
+ }
134
+ }
135
+
136
+
137
+ // todo.component.ts
138
+ import {useStore} from "reca";
139
+ import {ToDoStore} from "../stores/todo.store";
140
+
141
+ export const ToDoComponent = (): JSX.Element => {
142
+ const store = useStore(ToDoStore);
143
+
144
+ return (
145
+ <div className="todos">
146
+ ...
147
+
148
+ <div className="todos-input">
149
+ <input
150
+ onInput={() => store.handleCurrentEdit()}
151
+ value={store.currentTodo}
152
+ />
153
+
154
+ <button
155
+ onClick={() => store.handleAddTodo()}
156
+ type="button"
157
+ >
158
+ add
159
+ </button>
160
+ </div>
56
161
  </div>
57
162
  );
58
163
  };
59
164
  ```
60
- ...todo: withstore...
61
165
 
62
- ...todo: autostore...
166
+ ### Example using DI
167
+ This example demonstrates the simplicity of the business logic and the simplified principles of code organization according to the Clean Architecture methodology. The example is simplified for readme, but following the same principles you can organize a full-fledged Clean Architecture. Through the service constructor, you can pass other DI dependencies, such as Repository, Provider, and others.
168
+
169
+ ``` typescript
170
+ // SpaceXCompanyInfo.ts
171
+ export class SpaceXCompanyInfo {
172
+
173
+ public name: string = "";
174
+
175
+ public founder: string = "";
176
+
177
+ public employees: number = 0;
178
+
179
+ public applyData (json: object): this {
180
+ Object.assign(this, json);
181
+ return this;
182
+ }
183
+
184
+ }
185
+
186
+
187
+ // SpaceXService.ts
188
+ import {reflection} from "first-di";
189
+ import {SpaceXCompanyInfo} from "../models/SpaceXCompanyInfo";
190
+
191
+ @reflection
192
+ export class SpaceXService {
193
+
194
+ public async getCompanyInfo (): Promise<SpaceXCompanyInfo> {
195
+ const response = await fetch("https://api.spacexdata.com/v3/info");
196
+ const json: unknown = await response.json();
197
+
198
+ // ... and manies manies lines of logics
199
+
200
+ if (typeof json === "object" && json !== null) {
201
+ return new SpaceXCompanyInfo().applyData(json);
202
+ }
203
+ throw new Error("SpaceXService.getCompanyInfo: response object is not json");
204
+ }
205
+
206
+ }
207
+
208
+
209
+ // SpaceXStore.ts
210
+ import {reflection} from "first-di";
211
+ import {AutoStore} from "reca";
212
+ import {SpaceXCompanyInfo} from "../models/SpaceXCompanyInfo.js";
213
+ import {SpaceXService} from "../services/SpaceXService.js";
214
+
215
+ @reflection
216
+ export class SpaceXStore extends AutoStore {
217
+
218
+ public companyInfo: SpaceXCompanyInfo = new SpaceXCompanyInfo();
219
+
220
+ public constructor (
221
+ private readonly spaceXService: SpaceXService,
222
+ // private readonly logger: Logger
223
+ ) {
224
+ super();
225
+ }
226
+
227
+ public activate (): void {
228
+ this.fetchCompanyInfo();
229
+ }
230
+
231
+ private async fetchCompanyInfo (): Promise<void> {
232
+ try {
233
+ this.companyInfo = await this.spaceXService.getCompanyInfo();
234
+ } catch (error) {
235
+ // Process exceptions, ex: this.logger.error(error.message);
236
+ }
237
+ }
238
+
239
+ }
240
+
241
+
242
+ // SpaceXComponent.tsx
243
+ import {useStore} from "reca";
244
+ import {SpaceXStore} from "../stores/SpaceXStore.js";
245
+
246
+ export const TestStoreComponent = (): JSX.Element => {
247
+ const store = useStore(SpaceXStore);
248
+
249
+ return (
250
+ <div>
251
+ <p>
252
+ Company:
253
+ {" "}
254
+
255
+ {store.companyInfo.name}
256
+ </p>
257
+
258
+ <p>
259
+ Founder:
260
+ {" "}
261
+
262
+ {store.companyInfo.founder}
263
+ </p>
264
+ </div>
265
+ );
266
+ };
267
+
268
+ ```
63
269
 
64
270
  ## Support and Documentation
65
271
  Discord server: [click here](https://discordapp.com/channels/974049080454045796/974049142022209566)
66
272
 
67
- ...todo
273
+ Wiki: [click here](https://github.com/LabEG/reca/wiki)
68
274
 
69
275
  ## License
70
- ...todo
276
+ ReCA is [MIT licensed](https://github.com/LabEG/reca/blob/main/LICENSE).
package/dist/config.js CHANGED
@@ -9,8 +9,9 @@ export class DiConfig {
9
9
  export class Config {
10
10
  constructor() {
11
11
  this.di = new DiConfig();
12
- // eslint-disable-next-line @typescript-eslint/no-implied-eval, no-new-func
13
- this.isBrowser = new Function("try {return this===window;}catch(e){ return false;}")();
12
+ // From https://gist.github.com/rhysburnie/498bfd98f24b7daf5fd5930c7f3c1b7b
13
+ // eslint-disable-next-line @typescript-eslint/strict-boolean-expressions, @typescript-eslint/no-unnecessary-condition
14
+ this.isBrowser = !(typeof process !== "undefined" && process.versions && process.versions.node);
14
15
  }
15
16
  }
16
17
  export const config = new Config();
@@ -1 +1 @@
1
- {"version":3,"file":"config.js","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA,yCAAyC;AAEzC,OAAO,EAAC,OAAO,EAAC,MAAM,UAAU,CAAC;AAGjC,MAAM,OAAO,QAAQ;IAArB;QAEI,8DAA8D;QACvD,aAAQ,GAA6E,OAAO,CAAC;IAExG,CAAC;CAAA;AAED,MAAM,OAAO,MAAM;IAAnB;QAEW,OAAE,GAAa,IAAI,QAAQ,EAAE,CAAC;QAErC,2EAA2E;QAC3D,cAAS,GAAG,IAAI,QAAQ,CAAC,qDAAqD,CAAC,EAAa,CAAC;IAEjH,CAAC;CAAA;AAED,MAAM,CAAC,MAAM,MAAM,GAAG,IAAI,MAAM,EAAE,CAAC"}
1
+ {"version":3,"file":"config.js","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA,yCAAyC;AAEzC,OAAO,EAAC,OAAO,EAAC,MAAM,UAAU,CAAC;AAGjC,MAAM,OAAO,QAAQ;IAArB;QAEI,8DAA8D;QACvD,aAAQ,GAA6E,OAAO,CAAC;IAExG,CAAC;CAAA;AAED,MAAM,OAAO,MAAM;IAAnB;QAEW,OAAE,GAAa,IAAI,QAAQ,EAAE,CAAC;QAErC,2EAA2E;QAC3E,sHAAsH;QACtG,cAAS,GAAG,CAAC,CAAC,OAAO,OAAO,KAAK,WAAW,IAAI,OAAO,CAAC,QAAQ,IAAI,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;IAE/G,CAAC;CAAA;AAED,MAAM,CAAC,MAAM,MAAM,GAAG,IAAI,MAAM,EAAE,CAAC"}
@@ -51,7 +51,9 @@ store, props) => {
51
51
  }
52
52
  // PropsUpdate method
53
53
  useMemo(() => {
54
- stateStore.propsUpdate(props !== null && props !== void 0 ? props : {});
54
+ if (!isInit) {
55
+ stateStore.propsUpdate(props !== null && props !== void 0 ? props : {});
56
+ }
55
57
  }, [props !== null && props !== void 0 ? props : {}]);
56
58
  // AfterUpdate method
57
59
  useEffect(() => {
@@ -1 +1 @@
1
- {"version":3,"file":"UseStore.js","sourceRoot":"","sources":["../../src/hooks/UseStore.ts"],"names":[],"mappings":"AAGA,OAAO,EAAC,SAAS,EAAE,OAAO,EAAE,QAAQ,EAAC,MAAM,OAAO,CAAC;AACnD,OAAO,EAAC,MAAM,EAAC,MAAM,cAAc,CAAC;AAGpC;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AAuE;IACvE,IAAI,CAAC,MAAM,EAAE;QACT,UAAU,CAAC,MAAM,CAAC,KAAK,aAAL,KAAK,cAAL,KAAK,GAAI,EAAO,CAAC,CAAC;KACvC;IAED,qBAAqB;IACrB,OAAO,CACH,GAAG,EAAE;QACD,IAAI,CAAC,MAAM,EAAE;YACT,UAAU,CAAC,WAAW,CAAC,KAAK,aAAL,KAAK,cAAL,KAAK,GAAI,EAAO,CAAC,CAAC;SAC5C;IACL,CAAC,EACD,CAAC,KAAK,aAAL,KAAK,cAAL,KAAK,GAAI,EAAE,CAAC,CAChB,CAAC;IAEF,qBAAqB;IACrB,SAAS,CAAC,GAAG,EAAE;QACX,IAAI,CAAC,MAAM,EAAE;YACT,UAAU,CAAC,WAAW,CAAC,KAAK,aAAL,KAAK,cAAL,KAAK,GAAI,EAAO,CAAC,CAAC;SAC5C;QACD,UAAU,CAAC,UAAU,GAAG,KAAK,CAAC;IAClC,CAAC,CAAC,CAAC;IAEH,OAAO,UAAU,CAAC;AACtB,CAAC,CAAC"}
@@ -91,9 +91,16 @@ export class Store {
91
91
  * Update view on next requestAnimationFrame
92
92
  */
93
93
  redraw() {
94
- if (config.isBrowser && !this.isDrawTime) {
94
+ if (this.isDrawTime) {
95
+ return;
96
+ }
97
+ if (config.isBrowser) {
95
98
  requestAnimationFrame(() => this.redrawFunction());
96
99
  }
100
+ else {
101
+ // SSR don't use redraw, its for unit tests
102
+ this.redrawFunction();
103
+ }
97
104
  }
98
105
  /**
99
106
  * Update view component immediately
@@ -1 +1 @@
1
- {"version":3,"file":"Store.js","sourceRoot":"","sources":["../../src/stores/Store.ts"],"names":[],"mappings":"AAAA,sDAAsD;AAEtD,OAAO,EAAC,MAAM,EAAC,MAAM,cAAc,CAAC;AAEpC,MAAM,OAAO,KAAK;IAAlB;QAEI;;;WAGG;QACI,eAAU,GAAY,IAAI,CAAC;QAExB,mBAAc,GAAe,GAAG,EAAE,CAAC,KAAK,CAAC,CAAC;IAsGxD,CAAC;IApGG;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W;IACf,CAAC;IAED;;;;;;;;;;;OAWG;IACI,OAAO,CAAE,KAAQ;QACpB,WAAW;IACf,CAAC;IAEM,iBAAiB,CAAE,cAA0B;QAChD,IAAI,CAAC,cAAc,GAAG,cAAc,CAAC;IACzC,CAAC;IAED;;OAEG;IACI,MAAM;QACT,IAAI,IAAI,CAAC,UAAU,EAAE;YACjB,OAAO;SACV;QAED,IAAI,MAAM,CAAC,SAAS,EAAE;YAClB,qBAAqB,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,cAAc,EAAE,CAAC,CAAC;SACtD;aAAM;YACH,2CAA2C;YAC3C,IAAI,CAAC,cAAc,EAAE,CAAC;SACzB;IACL,CAAC;IAED;;OAEG;IACI,WAAW;QACd,IAAI,CAAC,cAAc,EAAE,CAAC;IAC1B,CAAC;CAEJ"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "reca",
3
- "version": "0.0.8",
3
+ "version": "0.0.9",
4
4
  "description": "ReCA - React Clean Architecture state manager",
5
5
  "main": "dist/index.js",
6
6
  "type": "module",
@@ -42,6 +42,7 @@
42
42
  "@types/jest": "^27.5.1",
43
43
  "@types/react": "^18.0.9",
44
44
  "babel-jest": "^28.1.0",
45
+ "cross-fetch": "^3.1.5",
45
46
  "husky": "^8.0.1",
46
47
  "jest": "^28.1.0",
47
48
  "jest-environment-jsdom": "^28.1.0",