@faasjs/react 5.0.1 → 6.0.0-beta.1

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.cjs CHANGED
@@ -17,10 +17,10 @@ var AsyncFunction = (async () => {
17
17
  }).constructor;
18
18
  function equal(a, b) {
19
19
  if (a === b) return true;
20
- if ((a === null || a === void 0) && (b === null || b === void 0))
20
+ if ((a === null || a === undefined) && (b === null || b === undefined))
21
21
  return true;
22
22
  if (typeof a !== typeof b) return false;
23
- if (b === null || b === void 0) return false;
23
+ if (b === null || b === undefined) return false;
24
24
  const ctor = a.constructor;
25
25
  if (ctor !== b.constructor) return false;
26
26
  switch (ctor) {
@@ -129,7 +129,7 @@ function createSplittingContext(defaultValue) {
129
129
  };
130
130
  }
131
131
  function usePrevious(value) {
132
- const ref = react.useRef(void 0);
132
+ const ref = react.useRef(undefined);
133
133
  react.useEffect(() => {
134
134
  ref.current = value;
135
135
  });
@@ -319,7 +319,7 @@ var ErrorBoundary = class extends react.Component {
319
319
  constructor(props) {
320
320
  super(props);
321
321
  this.state = {
322
- error: void 0,
322
+ error: undefined,
323
323
  info: { componentStack: "" }
324
324
  };
325
325
  }
@@ -436,7 +436,7 @@ FormBody.whyDidYouRender = true;
436
436
  // src/Form/rules.ts
437
437
  var FormDefaultRules = {
438
438
  required: async (value, _, lang) => {
439
- if (value === null || value === void 0 || value === "" || Number.isNaN(value)) {
439
+ if (value === null || value === undefined || value === "" || Number.isNaN(value)) {
440
440
  throw Error(lang?.required);
441
441
  }
442
442
  },
package/dist/index.mjs CHANGED
@@ -15,10 +15,10 @@ var AsyncFunction = (async () => {
15
15
  }).constructor;
16
16
  function equal(a, b) {
17
17
  if (a === b) return true;
18
- if ((a === null || a === void 0) && (b === null || b === void 0))
18
+ if ((a === null || a === undefined) && (b === null || b === undefined))
19
19
  return true;
20
20
  if (typeof a !== typeof b) return false;
21
- if (b === null || b === void 0) return false;
21
+ if (b === null || b === undefined) return false;
22
22
  const ctor = a.constructor;
23
23
  if (ctor !== b.constructor) return false;
24
24
  switch (ctor) {
@@ -127,7 +127,7 @@ function createSplittingContext(defaultValue) {
127
127
  };
128
128
  }
129
129
  function usePrevious(value) {
130
- const ref = useRef(void 0);
130
+ const ref = useRef(undefined);
131
131
  useEffect(() => {
132
132
  ref.current = value;
133
133
  });
@@ -317,7 +317,7 @@ var ErrorBoundary = class extends Component {
317
317
  constructor(props) {
318
318
  super(props);
319
319
  this.state = {
320
- error: void 0,
320
+ error: undefined,
321
321
  info: { componentStack: "" }
322
322
  };
323
323
  }
@@ -434,7 +434,7 @@ FormBody.whyDidYouRender = true;
434
434
  // src/Form/rules.ts
435
435
  var FormDefaultRules = {
436
436
  required: async (value, _, lang) => {
437
- if (value === null || value === void 0 || value === "" || Number.isNaN(value)) {
437
+ if (value === null || value === undefined || value === "" || Number.isNaN(value)) {
438
438
  throw Error(lang?.required);
439
439
  }
440
440
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@faasjs/react",
3
- "version": "5.0.1",
3
+ "version": "6.0.0-beta.1",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "main": "dist/index.cjs",
@@ -30,10 +30,10 @@
30
30
  "dist"
31
31
  ],
32
32
  "peerDependencies": {
33
- "@faasjs/browser": "5.0.1"
33
+ "@faasjs/browser": "6.0.0-beta.1"
34
34
  },
35
35
  "devDependencies": {
36
- "@faasjs/browser": "5.0.1",
36
+ "@faasjs/browser": "6.0.0-beta.1",
37
37
  "@types/react": "*",
38
38
  "react": "*"
39
39
  },