JSPM

  • Created
  • Published
  • Downloads 249589
  • Score
    100M100P100Q172541F
  • License MIT

Force-updates React component tree recursively

Package Exports

  • react-deep-force-update

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-deep-force-update) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

react-deep-force-update

Don’t use this in your application code!

You’ll only need this if you’re writing a React development tool and you want to enforce a deep update regardless of what component classes have to say.

Installation

npm install --save react-deep-force-update

Requires React 0.14 and newer.

Usage

import React from 'react'
import { render } from 'react-dom'
import deepForceUpdate from 'react-deep-force-update'

const instance = render(<Something />)

// Will force-update the whole rendered tree
// even if components in the middle of it
// define a strict shouldComponentUpdate().
deepForceUpdate(instance)

React Native

This will work with React Native when facebook/react-native#2985 lands.
For now, you can keep using 1.x.

Credits

This project is based on the code written by @syranide.