@samitouri / QOS-React-2 / commits / 5e79bd5c4f

Changelog for 0.13

Paul O’Shannessy committed Mar 10, 2015 at 13:44 UTC 5e79bd5c4fd63b90fab2eb04707bca299a24c508
1 file changed +57
CHANGELOG.md
+57
@@ -1,3 +1,60 @@
1 +## 0.13.0 (March 10, 2015)
2 +
3 +### React Core
4 +
5 +#### Breaking Changes
6 +
7 +* Mutating `props` after an element is created is deprecated and will cause warnings in development mode; future versions of React will incorporate performance optimizations assuming that props aren't mutated
8 +* Static methods (defined in `statics`) are no longer autobound to the component class
9 +* `ref` resolution order has changed slightly such that a ref to a component is available immediately after its `componentDidMount` method is called; this change should be observable only if your component calls a parent component's callback within your `componentDidMount`, which is an anti-pattern and should be avoided regardless
10 +* Calls to `setState` in life-cycle methods are now always batched and therefore asynchronous. Previously the first call on the first mount was synchronous.
11 +* `setState` and `forceUpdate` on an unmounted component now warns instead of throwing. That avoids a possible race condition with Promises.
12 +* Access to most internal properties has been completely removed, including `this._pendingState` and `this._rootNodeID`.
13 +
14 +#### New Features
15 +
16 +* Support for using ES6 classes to build React components; see the [v0.13.0 beta 1 notes](http://facebook.github.io/react/blog/2015/01/27/react-v0.13.0-beta-1.html) for details.
17 +* Added new top-level API `React.findDOMNode(component)`, which should be used in place of `component.getDOMNode()`. The base class for ES6-based components will not have `getDOMNode`. This change will enable some more patterns moving forward.
18 +* Added a new top-level API `React.cloneElement(el, props)` for making copies of React elements – see the [v0.13 RC2 notes](/react/blog/2015/03/03/react-v0.13-rc2.html#react.cloneelement) for more details.
19 +* New `ref` style, allowing a callback to be used in place of a name: `<Photo ref={(c) => this._photo = c} />` allows you to reference the component with `this._photo` (as opposed to `ref="photo"` which gives `this.refs.photo`).
20 +* `this.setState()` can now take a function as the first argument for transactional state updates, such as `this.setState((state, props) => ({count: state.count + 1}));` – this means that you no longer need to use `this._pendingState`, which is now gone.
21 +* Support for iterators and immutable-js sequences as children.
22 +
23 +#### Deprecations
24 +
25 +* `ComponentClass.type` is deprecated. Just use `ComponentClass` (usually as `element.type === ComponentClass`).
26 +* Some methods that are available on `createClass`-based components are removed or deprecated from ES6 classes (`getDOMNode`, `replaceState`, `isMounted`, `setProps`, `replaceProps`).
27 +
28 +### React with Add-Ons
29 +
30 +#### New Features
31 +
32 +* [`React.addons.createFragment` was added](/react/docs/create-fragment.html) for adding keys to entire sets of children.
33 +
34 +#### Deprecations
35 +
36 +* `React.addons.classSet` is now deprecated. This functionality can be replaced with several freely available modules. [classnames](https://www.npmjs.com/package/classnames) is one such module.
37 +* Calls to `React.addons.cloneWithProps` can be migrated to use `React.cloneElement` instead – make sure to merge `style` and `className` manually if desired.
38 +
39 +### React Tools
40 +
41 +#### Breaking Changes
42 +
43 +* When transforming ES6 syntax, `class` methods are no longer enumerable by default, which requires `Object.defineProperty`; if you support browsers such as IE8, you can pass `--target es3` to mirror the old behavior
44 +
45 +#### New Features
46 +
47 +* `--target` option is available on the jsx command, allowing users to specify and ECMAScript version to target.
48 + * `es5` is the default.
49 + * `es3` restores the previous default behavior. An additional transform is added here to ensure the use of reserved words as properties is safe (eg `this.static` will become `this['static']` for IE8 compatibility).
50 +* The transform for the call spread operator has also been enabled.
51 +
52 +### JSX
53 +
54 +#### Breaking Changes
55 +* A change was made to how some JSX was parsed, specifically around the use of `>` or `}` when inside an element. Previously it would be treated as a string but now it will be treated as a parse error. The [`jsx_orphaned_brackets_transformer`](https://www.npmjs.com/package/jsx_orphaned_brackets_transformer) package on npm can be used to find and fix potential issues in your JSX code.
56 +
57 +
58 ## 0.12.2 (December 18, 2014)
59
60 ### React Core