This package has been deprecated

Author message:

WARNING: This module has been renamed to react-throttle-render.

react-throttle-props

1.1.0 • Public • Published

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

Package Sidebar

Install

npm i react-throttle-props

Weekly Downloads

2

Version

1.1.0

License

MIT

Last publish

Collaborators

  • ryo33