Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

react-redux-pure

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-redux-pure - npm Package Compare versions

Comparing version 0.1.7 to 0.1.8

es6/Connect.d.ts

14

es6/index.d.ts

@@ -1,11 +0,3 @@

/// <reference types="react" />
import * as React from 'react';
export declare const Connect: <TProps>(name: string) => <TState, TActions>(state: (state: any, props?: TProps) => TState, dispatch: (dispatch: any, props?: TProps) => TActions, render: (props: TProps & TState & TActions & {
children?: React.ReactNode;
}) => React.ReactElement<TProps>) => React.StatelessComponent<TProps>;
export declare const PureFunctional: <TProps>(name: string) => (render: (props: TProps & {
children?: React.ReactNode;
}) => React.ReactElement<TProps>) => React.StatelessComponent<TProps>;
export declare const PureConnect: <TProps>(name: string) => <TState, TActions>(state: (state: any, props?: TProps) => TState, dispatch: (dispatch: any, props?: TProps) => TActions, render: (props: TProps & TState & TActions & {
children?: React.ReactNode;
}) => React.ReactElement<TProps>) => React.StatelessComponent<TProps>;
export * from './Connect';
export * from './PureConnect';
export * from './PureFunctional';
"use strict";
var __assign = (this && this.__assign) || Object.assign || function(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
t[p] = s[p];
}
return t;
};
var __rest = (this && this.__rest) || function (s, e) {
var t = {};
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
t[p] = s[p];
if (s != null && typeof Object.getOwnPropertySymbols === "function")
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0)
t[p[i]] = s[p[i]];
return t;
};
const React = require("react");
const react_redux_1 = require("react-redux");
const nameFunction = (name, fn) => new Function(`fn`, `return function ${name}() { return fn.apply(this, arguments) };`)(fn);
class PureComponentWrap extends React.PureComponent {
render() {
const _a = this.props, { _inner } = _a, others = __rest(_a, ["_inner"]);
return _inner(others);
}
function __export(m) {
for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
}
exports.Connect = function (name) {
return function (state, dispatch, render) {
return react_redux_1.connect(state, dispatch)(render);
};
};
exports.PureFunctional = function (name) {
return function (render) {
var f = function PureFunction(props) {
return React.createElement(PureComponentWrap, __assign({ _inner: render }, props));
};
if (f)
f = nameFunction(`PureFunctional_${name}`, f);
f.displayName = `PureFunctional(${name})`;
return f;
};
};
exports.PureConnect = function (name) {
return function (state, dispatch, render) {
var f = function PureFunction(props) {
return React.createElement(PureComponentWrap, __assign({ _inner: render }, props));
};
if (state)
state = nameFunction(`PureConnect_${name}_state`, state);
if (dispatch)
dispatch = nameFunction(`PureConnect_${name}_dispatch`, dispatch);
if (render)
render = nameFunction(`PureConnect_${name}_render`, render);
if (f)
f = nameFunction(`PureConnect_${name}`, f);
f.displayName = `PureConnect(${name})`;
return react_redux_1.connect(state, dispatch)(f);
};
};
Object.defineProperty(exports, "__esModule", { value: true });
__export(require("./Connect"));
__export(require("./PureConnect"));
__export(require("./PureFunctional"));
//# sourceMappingURL=index.js.map
{
"name": "react-redux-pure",
"version": "0.1.7",
"version": "0.1.8",
"description": "",

@@ -37,8 +37,8 @@ "main": "es6/index.js",

"devDependencies": {
"@types/react": "^15.0.6",
"react": "^15.4.2",
"react-redux": "^5.0.2",
"redux": "^3.6.0",
"typescript": "^2.1.5"
"@types/react": "^16.7.13",
"react": "^16.6.3",
"react-redux": "^5.1.1",
"redux": "^4.0.1",
"typescript": "^3.2.1"
}
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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