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

react-throttle-props

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-throttle-props

Throttle the number of times a component receives new props.

latest
Source
npmnpm
Version
1.1.0
Version published
Maintainers
1
Created
Source

react-throttle-props

npm version

Throttle the number of times a component receives new props not to call render() too many times.

Description

It may enhance the performance under the following conditions.

  • The component receives new props frequently.
  • The component has a huge or slow render().

Installation

npm i --save react-throttle-props

Usage

import throttle from 'react-throttle-props'

const ThrottledComponent = throttle(VeryBigRenderComponent, 50)

API

throttle(component, wait) => wrappedComponent

  • component The source React component
  • wait The number of milliseconds to throttle
  • wrappedComponent The throttled React component

License

MIT

Keywords

react

FAQs

Package last updated on 26 Aug 2016

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