Skip to content

Releases: gaearon/react-proxy

v2.0.2

04 Mar 21:25
Compare
Choose a tag to compare
  • Fixes issues in environments with native class support (#42, #41)

v1.1.3

04 Mar 21:26
Compare
Choose a tag to compare
  • Fixes issues in environments with native class support (#42, #41, backported from 2.x)

v2.0.1

28 Dec 19:21
Compare
Choose a tag to compare
  • Removes configs and .babelrc from NPM package
  • Adds a fallback for environments that don't support __proto__ (#27, #34)
  • Fixes an issue with inheritance (#35)

v1.1.2

28 Dec 19:52
Compare
Choose a tag to compare

Backported fixes from v2.0.1 to 1.x branch:

  • Removes configs and .babelrc from NPM package
  • Adds a fallback for environments that don't support __proto__ (#27, #34)
  • Fixes an issue with inheritance (#35)

v2.0.0

19 Oct 16:35
Compare
Choose a tag to compare

Breaking Changes

React 0.14 is now required

We assume that your code doesn't have warnings on React 0.14.
For example, we won't handle ES6 classes that don't inherit from React.Component correctly.

createProxy() is now the default export

Before

import { createProxy } from 'react-proxy';

After

import createProxy from 'react-proxy';

getForceUpdate() is gone

Bye bye getForceUpdate(). We don't offer it anymore.
You should use react-deep-force-update directly now.

Before

import React from 'react';
import { getForceUpdate } from 'react-proxy';

const deepForceUpdate = getForceUpdate(React);

After

import deepForceUpdate from 'react-deep-force-update';

Proxy#update() no longer returns mounted instances

Now that’s a bummer! We know. Sadly there’s no way we can retrieve a list of mounted instances for the pure function components. For consistency, we don’t attempt to do this at all now. You are encourage to keep a reference to the root instance yourself, and use react-deep-force-update to update it when necessary. Hopefully we’ll resolve this eventually when React provides a first-class DevTools API for traversing the rendered tree.

Before

import { createProxy, getForceUpdate } from 'react-proxy';

const proxy = createProxy(ComponentVersion1);
const Proxy = proxy.get();

React.render(<Proxy />, rootEl);

const mountedInstances = proxy.update(ComponentVersion2);
const forceUpdate = getForceUpdate(React);
mountedInstances.forEach(forceUpdate);

After

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

const proxy = createProxy(ComponentVersion1);
const Proxy = proxy.get();

// You now have to keep a reference to the root instance.
const rootInstance = render(<Proxy />, rootEl);

proxy.update(ComponentVersion2);
deepForceUpdate(rootInstance);

Improvements

  • Adds support for React 0.14 pure function components

v1.1.1

25 Sep 20:11
Compare
Choose a tag to compare

v1.1.0

16 Sep 23:40
Compare
Choose a tag to compare
  • The function returned by getForceUpdate now traverses the tree recursively, so even nested components with shouldComponentUpdate() { return false } are being force-updated (#25)

v1.0.0

02 Sep 11:33
Compare
Choose a tag to compare
  • Fixes recursion with proxies pointing to each other
  • We're stable!

v0.6.7

27 Aug 23:05
Compare
Choose a tag to compare
v0.6.7 Pre-release
Pre-release

v0.6.6

27 Aug 21:40
Compare
Choose a tag to compare
v0.6.6 Pre-release
Pre-release