source: node_modules/react-redux/dist/rsc.mjs

Last change on this file was a762898, checked in by istevanoska <ilinastevanoska@…>, 5 months ago

Added visualizations

  • Property mode set to 100644
File size: 1.3 KB
Line 
1// src/utils/shallowEqual.ts
2function is(x, y) {
3 if (x === y) {
4 return x !== 0 || y !== 0 || 1 / x === 1 / y;
5 } else {
6 return x !== x && y !== y;
7 }
8}
9function shallowEqual(objA, objB) {
10 if (is(objA, objB)) return true;
11 if (typeof objA !== "object" || objA === null || typeof objB !== "object" || objB === null) {
12 return false;
13 }
14 const keysA = Object.keys(objA);
15 const keysB = Object.keys(objB);
16 if (keysA.length !== keysB.length) return false;
17 for (let i = 0; i < keysA.length; i++) {
18 if (!Object.prototype.hasOwnProperty.call(objB, keysA[i]) || !is(objA[keysA[i]], objB[keysA[i]])) {
19 return false;
20 }
21 }
22 return true;
23}
24
25// src/index-rsc.ts
26var throwNotSupportedError = (...args) => {
27 throw new Error(
28 "This function is not supported in React Server Components. Please only use this export in a Client Component."
29 );
30};
31var ReactReduxContext = {};
32export {
33 throwNotSupportedError as Provider,
34 ReactReduxContext,
35 throwNotSupportedError as batch,
36 throwNotSupportedError as connect,
37 throwNotSupportedError as createDispatchHook,
38 throwNotSupportedError as createSelectorHook,
39 throwNotSupportedError as createStoreHook,
40 shallowEqual,
41 throwNotSupportedError as useDispatch,
42 throwNotSupportedError as useSelector,
43 throwNotSupportedError as useStore
44};
45//# sourceMappingURL=rsc.mjs.map
Note: See TracBrowser for help on using the repository browser.