defer-render-hoc

React defer render HOC

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
defer-render-hoc
1500.3.05 years ago5 years agoMinified + gzip package size for defer-render-hoc in KB

Readme

defer-render-hoc

Defer expensive react rendering with rAF

Install

$ npm install defer-render-hoc --save

Usage

import React, { Component } from 'react'
import DeferRender from 'defer-render-hoc'

class RandomComp extends Component {
  ...

  render () {
    const { scroll } = this.props

    ...
  }
}

export default DeferRender(RandomComp)

Demo

See this CodeSandbox for a demo.
MIT © Jack Hanford