JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 2
  • Score
    100M100P100Q39770F
  • License MIT

small HOC for implementing update on props changing

Package Exports

  • react-updating-hoc

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (react-updating-hoc) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

npm npm Dependency Status devDependency Status

react-updating-hoc

$ npm install react-updating-hoc --save

Usage

import React from 'react';
import updating from 'react-updating-hoc';

const SomeComponent = () => (<div>Hello wordl!</div>);

export default updating(
  (props, isInit) => { // update method
    doSomething(); 
  },
  (props, prevProps) => false // should update one more time
)(SomeComponent);