@flexsurfer/reflex 0.1.11 โ 0.1.12
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 +11 -1
- package/dist/index.cjs +3 -5
- package/dist/index.mjs +3 -5
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -20,6 +20,8 @@ After many years of building applications with re-frame in the ClojureScript wor
|
|
|
20
20
|
๐งฉ **Composable Architecture** - Build complex apps from simple, reusable pieces
|
|
21
21
|
๐ **Reactive Subscriptions** - UI automatically updates when state changes
|
|
22
22
|
๐ **Multi-Platform Support** - With effects separation, it's super easy to support multiple platforms with the same codebase, including web, mobile, and desktop
|
|
23
|
+
๐ค **AI Friendly** - Reviewing AI-generated changes is easier because all logic is expressed through pure, isolated functions, making each change understandable, verifiable, and deterministic.
|
|
24
|
+
๐ ๏ธ **Integrated DevTools** - Reflex-devtools provides deep visibility into your appโs state, events, and subscriptions in real time, forming a powerful combo with Reflex for effective development and debugging.
|
|
23
25
|
โก **Interceptor Pattern** - Powerful middleware system for cross-cutting concerns
|
|
24
26
|
๐ก๏ธ **Type Safety** - Full TypeScript support with excellent IDE experience
|
|
25
27
|
๐งช **Testability** - Pure functions make testing straightforward and reliable
|
|
@@ -28,6 +30,9 @@ After many years of building applications with re-frame in the ClojureScript wor
|
|
|
28
30
|
|
|
29
31
|
```bash
|
|
30
32
|
npm install @flexsurfer/reflex
|
|
33
|
+
npm install --save-dev @flexsurfer/reflex-devtools
|
|
34
|
+
|
|
35
|
+
npx reflex-devtools
|
|
31
36
|
```
|
|
32
37
|
|
|
33
38
|
### Basic Example
|
|
@@ -38,8 +43,13 @@ import {
|
|
|
38
43
|
regEvent,
|
|
39
44
|
regSub,
|
|
40
45
|
dispatch,
|
|
41
|
-
useSubscription
|
|
46
|
+
useSubscription,
|
|
47
|
+
enableTracing
|
|
42
48
|
} from '@flexsurfer/reflex';
|
|
49
|
+
import { enableDevtools } from '@flexsurfer/reflex-devtools'
|
|
50
|
+
|
|
51
|
+
enableTracing()
|
|
52
|
+
enableDevtools();
|
|
43
53
|
|
|
44
54
|
// Initialize your app database
|
|
45
55
|
initAppDb({ counter: 0 });
|
package/dist/index.cjs
CHANGED
|
@@ -627,9 +627,7 @@ function resetTracing() {
|
|
|
627
627
|
}
|
|
628
628
|
function registerTraceCb(key, cb) {
|
|
629
629
|
if (!traceEnabled) {
|
|
630
|
-
|
|
631
|
-
"Tracing is not enabled; call enableTracing() before registering callbacks"
|
|
632
|
-
);
|
|
630
|
+
consoleLog("warn", "[reflex] [trace] Tracing is not enabled; call enableTracing() before registering callbacks");
|
|
633
631
|
return;
|
|
634
632
|
}
|
|
635
633
|
traceCbs.set(key, cb);
|
|
@@ -645,7 +643,7 @@ function scheduleFlush() {
|
|
|
645
643
|
try {
|
|
646
644
|
cb(batch);
|
|
647
645
|
} catch (e) {
|
|
648
|
-
|
|
646
|
+
consoleLog("warn", "Error in trace callback", e);
|
|
649
647
|
}
|
|
650
648
|
}
|
|
651
649
|
}, DEBOUNCE_TIME);
|
|
@@ -971,7 +969,7 @@ var Reaction = class _Reaction {
|
|
|
971
969
|
operation: this.subVector?.[0] ?? "",
|
|
972
970
|
opType: "sub/dispose",
|
|
973
971
|
tags: {
|
|
974
|
-
|
|
972
|
+
queryV: this.subVector,
|
|
975
973
|
reaction: this.id
|
|
976
974
|
}
|
|
977
975
|
},
|
package/dist/index.mjs
CHANGED
|
@@ -559,9 +559,7 @@ function resetTracing() {
|
|
|
559
559
|
}
|
|
560
560
|
function registerTraceCb(key, cb) {
|
|
561
561
|
if (!traceEnabled) {
|
|
562
|
-
|
|
563
|
-
"Tracing is not enabled; call enableTracing() before registering callbacks"
|
|
564
|
-
);
|
|
562
|
+
consoleLog("warn", "[reflex] [trace] Tracing is not enabled; call enableTracing() before registering callbacks");
|
|
565
563
|
return;
|
|
566
564
|
}
|
|
567
565
|
traceCbs.set(key, cb);
|
|
@@ -577,7 +575,7 @@ function scheduleFlush() {
|
|
|
577
575
|
try {
|
|
578
576
|
cb(batch);
|
|
579
577
|
} catch (e) {
|
|
580
|
-
|
|
578
|
+
consoleLog("warn", "Error in trace callback", e);
|
|
581
579
|
}
|
|
582
580
|
}
|
|
583
581
|
}, DEBOUNCE_TIME);
|
|
@@ -903,7 +901,7 @@ var Reaction = class _Reaction {
|
|
|
903
901
|
operation: this.subVector?.[0] ?? "",
|
|
904
902
|
opType: "sub/dispose",
|
|
905
903
|
tags: {
|
|
906
|
-
|
|
904
|
+
queryV: this.subVector,
|
|
907
905
|
reaction: this.id
|
|
908
906
|
}
|
|
909
907
|
},
|