Skip to content

Commit 5df43ad

Browse files
committed
dust factoring
1 parent 0562284 commit 5df43ad

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

90 files changed

+2630
-202
lines changed

Component.cjs

+59
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
"use strict";
2+
3+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4+
5+
Object.defineProperty(exports, "__esModule", {
6+
value: true
7+
});
8+
exports.default = void 0;
9+
10+
var _react = _interopRequireDefault(require("react"));
11+
12+
var _jsxRuntime = require("react/jsx-runtime");
13+
14+
// Copyright 2017-2021 @polkadot/dev authors & contributors
15+
// SPDX-License-Identifier: Apache-2.0
16+
function Child({
17+
children,
18+
className,
19+
label
20+
}) {
21+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
22+
className: className,
23+
children: [label || '', children]
24+
});
25+
}
26+
27+
function Component({
28+
children,
29+
className,
30+
label
31+
}) {
32+
const bon = '123';
33+
34+
if (label === bon) {
35+
console.error('true');
36+
}
37+
38+
try {
39+
console.log('bon');
40+
} catch (error) {// ignore;
41+
}
42+
43+
console.log('1');
44+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
45+
className: className,
46+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(Child, {
47+
className: "child",
48+
label: label,
49+
children: children
50+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(Child, {
51+
className: "child",
52+
children: "bob"
53+
})]
54+
});
55+
}
56+
57+
var _default = /*#__PURE__*/_react.default.memo(Component);
58+
59+
exports.default = _default;

Component.d.ts

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import React from 'react';
2+
interface Props {
3+
children: React.ReactNode;
4+
className?: string;
5+
label?: string;
6+
}
7+
declare function Component({ children, className, label }: Props): React.ReactElement<Props>;
8+
declare const _default: React.MemoExoticComponent<typeof Component>;
9+
export default _default;

Component.js

+48
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
// Copyright 2017-2021 @polkadot/dev authors & contributors
2+
// SPDX-License-Identifier: Apache-2.0
3+
import React from 'react';
4+
import { jsxs as _jsxs } from "react/jsx-runtime";
5+
import { jsx as _jsx } from "react/jsx-runtime";
6+
7+
function Child({
8+
children,
9+
className,
10+
label
11+
}) {
12+
return /*#__PURE__*/_jsxs("div", {
13+
className: className,
14+
children: [label || '', children]
15+
});
16+
}
17+
18+
function Component({
19+
children,
20+
className,
21+
label
22+
}) {
23+
const bon = '123';
24+
25+
if (label === bon) {
26+
console.error('true');
27+
}
28+
29+
try {
30+
console.log('bon');
31+
} catch (error) {// ignore;
32+
}
33+
34+
console.log('1');
35+
return /*#__PURE__*/_jsxs("div", {
36+
className: className,
37+
children: [/*#__PURE__*/_jsx(Child, {
38+
className: "child",
39+
label: label,
40+
children: children
41+
}), /*#__PURE__*/_jsx(Child, {
42+
className: "child",
43+
children: "bob"
44+
})]
45+
});
46+
}
47+
48+
export default /*#__PURE__*/React.memo(Component);

0 commit comments

Comments
 (0)