@flexsurfer/reflex 0.1.10 → 0.1.11

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
@@ -4,9 +4,7 @@
4
4
 
5
5
  **re-frame for the JavaScript world**
6
6
 
7
- A reactive, functional state management library that brings the elegance and power of ClojureScript's re-frame to JavaScript and React/RN applications.
8
-
9
- > ⚠️ **Development Status**: This library is in active development and not yet ready for production use. Perfect for pet projects, experiments, and learning! The community is warmly invited to contribute to the development and improvement of the library, including optimizations for data comparison at different lifecycle stages.
7
+ A reactive, functional state management library that brings the elegance and power of ClojureScript's re-frame to JavaScript and React/ReactNative applications.
10
8
 
11
9
  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
12
10
  [![NPM Version](https://img.shields.io/npm/v/%40flexsurfer%2Freflex)](https://www.npmjs.com/package/@flexsurfer/reflex)
@@ -16,11 +14,12 @@ A reactive, functional state management library that brings the elegance and pow
16
14
 
17
15
  ## ✨ Why Reflex?
18
16
 
19
- After many years of building applications with re-frame in the ClojureScript world, I wanted to bring the same architectural elegance to the JavaScript/TypeScript ecosystem. Reflex is not just another state management library—it's a battle-tested pattern that promotes:
17
+ After many years of building applications with re-frame in the ClojureScript world, I wanted to bring the same architectural elegance to the JavaScript/TypeScript ecosystem. Reflex is not just another state management library—it's a **battle-tested** pattern that promotes:
20
18
 
21
19
  🎯 **Predictable State Management** - Unidirectional data flow with pure functions
22
20
  🧩 **Composable Architecture** - Build complex apps from simple, reusable pieces
23
21
  🔄 **Reactive Subscriptions** - UI automatically updates when state changes
22
+ 🌐 **Multi-Platform Support** - With effects separation, it's super easy to support multiple platforms with the same codebase, including web, mobile, and desktop
24
23
  ⚡ **Interceptor Pattern** - Powerful middleware system for cross-cutting concerns
25
24
  🛡️ **Type Safety** - Full TypeScript support with excellent IDE experience
26
25
  🧪 **Testability** - Pure functions make testing straightforward and reliable
package/dist/index.cjs CHANGED
@@ -1039,8 +1039,6 @@ function getOrCreateReaction(subVector) {
1039
1039
  consoleLog("error", `[reflex] no sub handler registered for: ${subId}`);
1040
1040
  return null;
1041
1041
  }
1042
- withTrace({ operation: subVector[0], opType: KIND4, tags: { queryV: subVector } }, () => {
1043
- });
1044
1042
  const computeFn = getHandler(KIND4, subId);
1045
1043
  const subVectorKey = JSON.stringify(subVector);
1046
1044
  const existingReaction = getReaction(subVectorKey);
@@ -1048,7 +1046,8 @@ function getOrCreateReaction(subVector) {
1048
1046
  mergeTrace({ tags: { "cached?": true, reaction: existingReaction.getId() } });
1049
1047
  return existingReaction;
1050
1048
  }
1051
- mergeTrace({ tags: { "cached?": false } });
1049
+ withTrace({ operation: subVector[0], opType: "sub/create", tags: { queryV: subVector } }, () => {
1050
+ });
1052
1051
  const params = subVector.length > 1 ? subVector.slice(1) : [];
1053
1052
  const depsFn = getHandler(KIND_DEPS, subId);
1054
1053
  const depsVectors = depsFn(...params);
@@ -1065,7 +1064,6 @@ function getOrCreateReaction(subVector) {
1065
1064
  },
1066
1065
  depsReactions
1067
1066
  );
1068
- mergeTrace({ reaction: reaction.getId() });
1069
1067
  reaction.setId(subVectorKey);
1070
1068
  reaction.setSubVector(subVector);
1071
1069
  setReaction(subVectorKey, reaction);
package/dist/index.mjs CHANGED
@@ -971,8 +971,6 @@ function getOrCreateReaction(subVector) {
971
971
  consoleLog("error", `[reflex] no sub handler registered for: ${subId}`);
972
972
  return null;
973
973
  }
974
- withTrace({ operation: subVector[0], opType: KIND4, tags: { queryV: subVector } }, () => {
975
- });
976
974
  const computeFn = getHandler(KIND4, subId);
977
975
  const subVectorKey = JSON.stringify(subVector);
978
976
  const existingReaction = getReaction(subVectorKey);
@@ -980,7 +978,8 @@ function getOrCreateReaction(subVector) {
980
978
  mergeTrace({ tags: { "cached?": true, reaction: existingReaction.getId() } });
981
979
  return existingReaction;
982
980
  }
983
- mergeTrace({ tags: { "cached?": false } });
981
+ withTrace({ operation: subVector[0], opType: "sub/create", tags: { queryV: subVector } }, () => {
982
+ });
984
983
  const params = subVector.length > 1 ? subVector.slice(1) : [];
985
984
  const depsFn = getHandler(KIND_DEPS, subId);
986
985
  const depsVectors = depsFn(...params);
@@ -997,7 +996,6 @@ function getOrCreateReaction(subVector) {
997
996
  },
998
997
  depsReactions
999
998
  );
1000
- mergeTrace({ reaction: reaction.getId() });
1001
999
  reaction.setId(subVectorKey);
1002
1000
  reaction.setSubVector(subVector);
1003
1001
  setReaction(subVectorKey, reaction);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flexsurfer/reflex",
3
- "version": "0.1.10",
3
+ "version": "0.1.11",
4
4
  "license": "MIT",
5
5
  "repository": {
6
6
  "type": "git",