@expressive/react 0.36.1 → 0.36.3

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/dist/index.js CHANGED
@@ -168,8 +168,10 @@ var import_mvc3 = require("@expressive/mvc");
168
168
  // src/consumer.ts
169
169
  function Consumer(props) {
170
170
  const { children, has, get: get2, for: Type } = props;
171
+ if (typeof children == "function")
172
+ return children(Type.get());
171
173
  const instance = Type.get(!!has);
172
- const callback = children || has || get2;
174
+ const callback = has || get2;
173
175
  if (typeof callback == "function")
174
176
  callback(instance);
175
177
  return null;
package/dist/index.mjs CHANGED
@@ -140,8 +140,10 @@ import { add, get, use, ref, set } from "@expressive/mvc";
140
140
  // src/consumer.ts
141
141
  function Consumer(props) {
142
142
  const { children, has, get: get2, for: Type } = props;
143
+ if (typeof children == "function")
144
+ return children(Type.get());
143
145
  const instance = Type.get(!!has);
144
- const callback = children || has || get2;
146
+ const callback = has || get2;
145
147
  if (typeof callback == "function")
146
148
  callback(instance);
147
149
  return null;
package/package.json CHANGED
@@ -31,7 +31,7 @@
31
31
  "preversion": "npm run test && npm run build"
32
32
  },
33
33
  "dependencies": {
34
- "@expressive/mvc": "^0.36.1"
34
+ "@expressive/mvc": "^0.36.3"
35
35
  },
36
36
  "peerDependencies": {
37
37
  "react": ">=16.8.0 <19.0.0"
@@ -42,6 +42,6 @@
42
42
  "react": "^18.2.0",
43
43
  "react-test-renderer": "^18.2.0"
44
44
  },
45
- "version": "0.36.1",
46
- "gitHead": "032003a3354af0ad51cb539c6fc37e98697b77dc"
45
+ "version": "0.36.3",
46
+ "gitHead": "68142bec2c7c9bf8b9cb62e655ac9b35d6a6134f"
47
47
  }