Skip to content

Commit

Permalink
fix: remove react-hot-loader (#44)
Browse files Browse the repository at this point in the history
  • Loading branch information
dadamssg authored May 6, 2022
1 parent 897d6bc commit 4ff5e13
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 29 deletions.
6 changes: 2 additions & 4 deletions dist/cjs/Table.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ var _react = _interopRequireWildcard(require("react"));

var _propTypes = _interopRequireDefault(require("prop-types"));

var _reactHotLoader = require("react-hot-loader");

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } }
Expand Down Expand Up @@ -164,12 +162,12 @@ _defineProperty(ColumnGroup, "defaultProps", {

function isColumnGroup(child) {
child = child || {};
return (0, _reactHotLoader.areComponentsEqual)(child.type, ColumnGroup);
return child && child.type === ColumnGroup;
}

function isColumn(child) {
child = child || {};
return (0, _reactHotLoader.areComponentsEqual)(child.type, Column);
return child && child.type === Column;
}

function getColumns(children) {
Expand Down
5 changes: 2 additions & 3 deletions dist/es/Table.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope

import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { areComponentsEqual } from 'react-hot-loader';
var defaultClickableClass = 'clickable';

var noop = function noop() {};
Expand Down Expand Up @@ -144,12 +143,12 @@ _defineProperty(ColumnGroup, "defaultProps", {

function isColumnGroup(child) {
child = child || {};
return areComponentsEqual(child.type, ColumnGroup);
return child && child.type === ColumnGroup;
}

function isColumn(child) {
child = child || {};
return areComponentsEqual(child.type, Column);
return child && child.type === Column;
}

function getColumns(children) {
Expand Down
2 changes: 1 addition & 1 deletion dist/umd/c2-table.js

Large diffs are not rendered by default.

3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,6 @@
"react-dom": "^16.8.0"
},
"dependencies": {
"prop-types": "^15.6.2",
"react-hot-loader": "^4.3.11"
"prop-types": "^15.6.2"
}
}
5 changes: 2 additions & 3 deletions src/Table.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import React, {Component} from 'react'
import PropTypes from 'prop-types'
import {areComponentsEqual} from 'react-hot-loader'

const defaultClickableClass = 'clickable'

Expand Down Expand Up @@ -91,12 +90,12 @@ class ColumnGroup extends Component {

function isColumnGroup (child) {
child = child || {}
return areComponentsEqual(child.type, ColumnGroup)
return child && child.type === ColumnGroup
}

function isColumn (child) {
child = child || {}
return areComponentsEqual(child.type, Column)
return child && child.type === Column
}

function getColumns (children) {
Expand Down
17 changes: 1 addition & 16 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -8426,10 +8426,6 @@ hmac-drbg@^1.0.0:
minimalistic-assert "^1.0.0"
minimalistic-crypto-utils "^1.0.1"

hoist-non-react-statics@^2.5.0:
version "2.5.5"
resolved "https://registry.yarnpkg.com/hoist-non-react-statics/-/hoist-non-react-statics-2.5.5.tgz#c5903cf409c0dfd908f388e619d86b9c1174cb47"

hoist-non-react-statics@^3.3.0, hoist-non-react-statics@^3.3.1:
version "3.3.2"
resolved "https://registry.yarnpkg.com/hoist-non-react-statics/-/hoist-non-react-statics-3.3.2.tgz#ece0acaf71d62c2969c2ec59feff42a4b1a85b45"
Expand Down Expand Up @@ -13603,17 +13599,6 @@ react-hot-loader@^4.12.18:
shallowequal "^1.1.0"
source-map "^0.7.3"

react-hot-loader@^4.3.11:
version "4.3.11"
resolved "https://registry.yarnpkg.com/react-hot-loader/-/react-hot-loader-4.3.11.tgz#fe5cf7be7700c249b58293f977c1e6e0900f0d87"
dependencies:
fast-levenshtein "^2.0.6"
global "^4.3.0"
hoist-non-react-statics "^2.5.0"
prop-types "^15.6.1"
react-lifecycles-compat "^3.0.4"
shallowequal "^1.0.2"

react-is@^16.7.0, react-is@^16.8.1:
version "16.12.0"
resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.12.0.tgz#2cc0fe0fba742d97fd527c42a13bec4eeb06241c"
Expand Down Expand Up @@ -14944,7 +14929,7 @@ shallow-compare@^1.2.2:
resolved "https://registry.yarnpkg.com/shallow-compare/-/shallow-compare-1.2.2.tgz#fa4794627bf455a47c4f56881d8a6132d581ffdb"
integrity sha512-LUMFi+RppPlrHzbqmFnINTrazo0lPNwhcgzuAXVVcfy/mqPDrQmHAyz5bvV0gDAuRFrk804V0HpQ6u9sZ0tBeg==

shallowequal@^1.0.2, shallowequal@^1.1.0:
shallowequal@^1.1.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/shallowequal/-/shallowequal-1.1.0.tgz#188d521de95b9087404fd4dcb68b13df0ae4e7f8"

Expand Down

0 comments on commit 4ff5e13

Please sign in to comment.