New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

react-shallow-equal

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-shallow-equal

Efficient shallow equality algorithm for React and React Native

latest
Source
npmnpm
Version
0.1.1
Version published
Weekly downloads
10K
85.59%
Maintainers
1
Weekly downloads
 
Created
Source

react-shallow-equal · npm

Efficient shallow equality algorithm for React and React Native.

This is a fork of lelandrichardson/shallow-element-equals.

Table of Contents

Install

yarn add react-shallow-equal
  # or
npm install --save react-shallow-equal

Usage

import React, {PureComponent} from 'react';
import {propsEqual} from 'react-shallow-equal';

// ...

shouldComponentUpdate(nextProps) {
  return !propsEqual(this.props, nextProps);
}

// ...

API

propsEqual(a, b, options)

elementsEqual(a, b)

stylesEqual(a, b)

See lelandrichardson/style-equal

Keywords

react

FAQs

Package last updated on 28 Jul 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts