Browse Source

Add a code format in 2015-02-24-react-v0.13-rc1.md

main
Toru Kobayashi 10 years ago
parent
commit
8b9cf8442e
  1. 2
      _posts/2015-02-24-react-v0.13-rc1.md

2
_posts/2015-02-24-react-v0.13-rc1.md

@ -42,7 +42,7 @@ We've also published version `0.13.0-rc1` of the `react` and `react-tools` packa
* 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
* 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.
* 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`)
* `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.
* `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.
* Support for iterators and immutable-js sequences as children
#### Deprecations

Loading…
Cancel
Save