@reach/component-component
Advanced tools
Comparing version 0.0.2 to 0.1.0
@@ -10,2 +10,3 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } | ||
import React from "react"; | ||
import { object, func, oneOfType, node } from "prop-types"; | ||
@@ -131,2 +132,17 @@ var cleanProps = function cleanProps(props) { | ||
process.env.NODE_ENV !== "production" ? Component.propTypes = { | ||
initialState: object, | ||
getInitialState: func, | ||
refs: object, | ||
getRefs: func, | ||
didMount: func, | ||
didUpdate: func, | ||
willUnmount: func, | ||
getSnapshotBeforeUpdate: func, | ||
shouldUpdate: func, | ||
render: func, | ||
children: oneOfType([func, node]) | ||
} : void 0; | ||
export default Component; |
15
index.js
@@ -9,2 +9,4 @@ "use strict"; | ||
var _propTypes = require("prop-types"); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
@@ -139,2 +141,15 @@ | ||
process.env.NODE_ENV !== "production" ? Component.propTypes = { | ||
initialState: _propTypes.object, | ||
getInitialState: _propTypes.func, | ||
refs: _propTypes.object, | ||
getRefs: _propTypes.func, | ||
didMount: _propTypes.func, | ||
didUpdate: _propTypes.func, | ||
willUnmount: _propTypes.func, | ||
getSnapshotBeforeUpdate: _propTypes.func, | ||
shouldUpdate: _propTypes.func, | ||
render: _propTypes.func, | ||
children: (0, _propTypes.oneOfType)([_propTypes.func, _propTypes.node]) | ||
} : void 0; | ||
exports.default = Component; |
{ | ||
"name": "@reach/component-component", | ||
"version": "0.0.2", | ||
"version": "0.1.0", | ||
"description": "Declarative React Component Definitions", | ||
"main": "index.js", | ||
"module": "es/index.js", | ||
"scripts": { | ||
@@ -13,4 +14,4 @@ "test": "jest", | ||
"peerDependencies": { | ||
"react": "15.x || 16.x", | ||
"react-dom": "15.x || 16.x" | ||
"react": "^16.4.0", | ||
"react-dom": "^16.4.0" | ||
}, | ||
@@ -17,0 +18,0 @@ "devDependencies": { |
import React from "react"; | ||
import { object, func, oneOfType, node } from "prop-types"; | ||
@@ -21,2 +22,16 @@ let cleanProps = props => { | ||
class Component extends React.Component { | ||
static propTypes = { | ||
initialState: object, | ||
getInitialState: func, | ||
refs: object, | ||
getRefs: func, | ||
didMount: func, | ||
didUpdate: func, | ||
willUnmount: func, | ||
getSnapshotBeforeUpdate: func, | ||
shouldUpdate: func, | ||
render: func, | ||
children: oneOfType([func, node]) | ||
}; | ||
static defaultProps = { | ||
@@ -23,0 +38,0 @@ getInitialState: () => {}, |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No README
QualityPackage does not have a README. This may indicate a failed publish or a low quality package.
Found 1 instance in 1 package
15979
7
400
0
4
3