@samitouri / QOS-React-2 / commits / 9e160df868

Blog post for 0.9 release candidate

Ben Alpert committed Feb 12, 2014 at 20:45 UTC 9e160df86806c2746735492263401aac725281af
2 files changed +132
docs/_posts/2014-02-16-react-v0.9-rc1.md new
+132
@@ -0,0 +1,132 @@
1 +---
2 +title: React v0.9 RC
3 +layout: post
4 +author: Ben Alpert
5 +---
6 +
7 +We're almost ready to release React v0.9! We're posting a release candidate so that you can test your apps on it; we'd much prefer to find show-stopping bugs now rather than after we release.
8 +
9 +The release candidate is available for download from the CDN:
10 +
11 +* **React**
12 + Dev build with warnings: <http://fb.me/react-0.9.0-rc1.js>
13 + Minified build for production: <http://fb.me/react-0.9.0-rc1.min.js>
14 +* **React with Add-Ons**
15 + Dev build with warnings: <http://fb.me/react-with-addons-0.9.0-rc1.js>
16 + Minified build for production: <http://fb.me/react-with-addons-0.9.0-rc1.min.js>
17 +* **In-Browser JSX transformer**
18 + <http://fb.me/JSXTransformer-0.9.0-rc1.js>
19 +
20 +We've also published version `0.9.0-rc1` of the `react` and `react-tools` packages on npm and the `react` package on bower.
21 +
22 +Please try these builds out and [file an issue on GitHub](https://github.com/facebook/react/issues/new) if you see anything awry.
23 +
24 +## Upgrade Notes
25 +
26 +In addition to the changes to React core listed below, we've made a small change to the way JSX interprets whitespace to make things more consistent. With this release, space between two components on the same line will be preserved, while a newline separating a text node from a tag will be eliminated in the output. Consider the code:
27 +
28 +```html
29 +<div>
30 + Monkeys:
31 + {listOfMonkeys} {submitButton}
32 +</div>
33 +```
34 +
35 +In v0.8 and below, it was transformed to the following:
36 +
37 +```javascript
38 +React.DOM.div(null,
39 + " Monkeys: ",
40 + listOfMonkeys, submitButton
41 +)
42 +```
43 +
44 +In v0.9, it will be transformed to this JS instead:
45 +
46 +```javascript{2,3}
47 +React.DOM.div(null,
48 + "Monkeys:",
49 + listOfMonkeys, " ", submitButton
50 +)
51 +```
52 +
53 +We believe this new behavior is more helpful and elimates cases where unwanted whitespace was previously added.
54 +
55 +In cases where you want to preserve the space adjacent to a newline, you can write a JS string like `{"Monkeys: "}` in your JSX source. We've included a script to do an automated codemod of your JSX source tree that preserves the old whitespace behavior by adding and removing spaces appropriately. You can [install jsx\_whitespace\_transformer from npm](https://github.com/facebook/react/blob/master/npm-jsx_whitespace_transformer/README.md) and run it over your source tree to modify files in place. The transformed JSX files will preserve your code's existing whitespace behavior.
56 +
57 +## Changelog
58 +
59 +### React Core
60 +
61 +#### Breaking Changes
62 +
63 +- The lifecycle methods `componentDidMount` and `componentDidUpdate` no longer receive the root node as a parameter; use `this.getDOMNode()` instead
64 +- Whenever a prop is equal to `undefined`, the default value returned by `getDefaultProps` will now be used instead
65 +- `React.unmountAndReleaseReactRootNode` was previously deprecated and has now been removed
66 +- `React.renderComponentToString` is now synchronous and returns the generated HTML string
67 +- Full-page rendering (that is, rendering the `<html>` tag using React) is now supported only when starting with server-rendered markup
68 +- On mouse wheel events, `deltaY` is no longer negated
69 +- When prop types validation fails, a warning is logged instead of an error thrown (with the production build of React, the type checks are now skipped for performance)
70 +- On `input`, `select`, and `textarea` elements, `.getValue()` is no longer supported; use `.getDOMNode().value` instead
71 +
72 +#### New Features
73 +
74 +- React now never rethrows errors, so stack traces are more accurate and Chrome's purple break-on-error stop sign now works properly
75 +- Added a new tool for profiling React components and identifying places where defining `shouldComponentUpdate` can give performance improvements
76 +- Added support for SVG tags `defs`, `linearGradient`, `polygon`, `radialGradient`, `stop`
77 +- Added support for more attributes:
78 + - `noValidate` and `formNoValidate` for forms
79 + - `property` for Open Graph `<meta>` tags
80 + - `sandbox`, `seamless`, and `srcDoc` for `<iframe>` tags
81 + - `scope` for screen readers
82 + - `span` for `<colgroup>` tags
83 +- Added support for defining `propTypes` in mixins
84 +- Added `any`, `arrayOf`, `component`, `oneOfType`, `renderable`, `shape` to `React.PropTypes`
85 +- Added support for `statics` on component spec for static component methods
86 +- On all events, `.currentTarget` is now properly set
87 +- On keyboard events, `.key` is now polyfilled in all browsers for special (non-printable) keys
88 +- On clipboard events, `.clipboardData` is now polyfilled in IE
89 +- On drag events, `.dragTransfer` is now present
90 +- Added support for `onMouseOver` and `onMouseOut` in addition to the existing `onMouseEnter` and `onMouseLeave` events
91 +- Added support for `onLoad` and `onError` on `<img>` elements
92 +- Added support for `onReset` on `<form>` elements
93 +- The `autoFocus` attribute is now polyfilled consistently on `input`, `select`, and `textarea`
94 +
95 +#### Bug Fixes
96 +
97 +- React no longer adds an `__owner__` property to each component's `props` object; passed-in props are now never mutated
98 +- When nesting top-level components (e.g., calling `React.renderComponent` within `componentDidMount`), events now properly bubble to the parent component
99 +- Fixed a case where nesting top-level components would throw an error when updating
100 +- Passing an invalid or misspelled propTypes type now throws an error
101 +- On mouse enter/leave events, `.target`, `.relatedTarget`, and `.type` are now set properly
102 +- On composition events, `.data` is now properly normalized in IE9 and IE10
103 +- CSS property values no longer have `px` appended for the unitless properties `columnCount`, `flex`, `flexGrow`, `flexShrink`, `lineClamp`, `order`, `widows`
104 +- Fixed a memory leak when unmounting children with a `componentWillUnmount` handler
105 +- Fixed a memory leak when `renderComponentToString` would store event handlers
106 +- Fixed an error that could be thrown when removing form elements during a click handler
107 +- `key` values containing `.` are now supported
108 +- Shortened `data-reactid` values for performance
109 +- Components now always remount when the `key` property changes
110 +- Event handlers are attached to `document` only when necessary, improving performance in some cases
111 +- Events no longer use `.returnValue` in modern browsers, eliminating a warning in Chrome
112 +- `scrollLeft` and `scrollTop` are no longer accessed on document.body, eliminating a warning in Chrome
113 +- General performance fixes, memory optimizations, improvements to warnings and error messages
114 +
115 +### React with Addons
116 +
117 +- `React.addons.TransitionGroup` was renamed to `React.addons.CSSTransitionGroup`
118 +- `React.addons.TransitionGroup` was added as a more general animation wrapper
119 +- `React.addons.cloneWithProps` was added for cloning components and modifying their props
120 +- Bug fix for adding back nodes during an exit transition for CSSTransitionGroup
121 +- Bug fix for changing `transitionLeave` in CSSTransitionGroup
122 +- Performance optimizations for CSSTransitionGroup
123 +- On checkbox `<input>` elements, `checkedLink` is now supported for two-way binding
124 +
125 +### JSX Compiler and react-tools Package
126 +
127 +- Whitespace normalization has changed; now space between two tags on the same line will be preserved, while newlines between two tags will be removed
128 +- The `react-tools` npm package no longer includes the React core libraries; use the `react` package instead.
129 +- `displayName` is now added in more cases, improving error messages and names in the React Dev Tools
130 +- Fixed an issue where an invalid token error was thrown after a JSX closing tag
131 +- `JSXTransformer` now uses source maps automatically in modern browsers
132 +- `JSXTransformer` error messages now include the filename and problematic line contents when a file fails to parse
docs/downloads/react-0.9.0-rc1.zip
Binary files /dev/null and b/docs/downloads/react-0.9.0-rc1.zip differ