Socket
Socket
Sign inDemoInstall

@reach/component-component

Package Overview
Dependencies
Maintainers
1
Versions
36
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@reach/component-component - npm Package Compare versions

Comparing version 0.0.2 to 0.1.0

README.md

16

es/index.js

@@ -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;

@@ -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;

7

package.json
{
"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: () => {},

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc