@samitouri / QOS-React-2 / commits / 8814ee2065

Release materials for 0.11

Paul O’Shannessy committed Jul 17, 2014 at 13:35 UTC 8814ee20658f59a17483ed4229b1b4fc1374dddc
6 files changed +204 -6
CHANGELOG.md
+51
@@ -1,3 +1,54 @@
1 +## 0.11.0 (July 17, 2014)
2 +
3 +### React Core
4 +
5 +#### Breaking Changes
6 +* `getDefaultProps()` is now called once per class and shared across all instances
7 +
8 +#### New Features
9 +* Rendering to `null`
10 +* Keyboard events include normalized `e.key` and `e.getModifierState()` properties
11 +* New normalized `onBeforeInput` event
12 +* `React.Children.count` has been added as a helper for counting the number of children
13 +
14 +#### Bug Fixes
15 +
16 +* Re-renders are batched in more cases
17 +* Events: `e.view` properly normalized
18 +* Added Support for more HTML attributes (`coords`, `crossOrigin`, `download`, `hrefLang`, `mediaGroup`, `muted`, `scrolling`, `shape`, `srcSet`, `start`, `useMap`)
19 +* Improved SVG support
20 + * Changing `className` on a mounted SVG component now works correctly
21 + * Added support for elements `mask` and `tspan`
22 + * Added support for attributes `dx`, `dy`, `fillOpacity`, `fontFamily`, `fontSize`, `markerEnd`, `markerMid`, `markerStart`, `opacity`, `patternContentUnits`, `patternUnits`, `preserveAspectRatio`, `strokeDasharray`, `strokeOpacity`
23 +* CSS property names with vendor prefixes (`Webkit`, `ms`, `Moz`, `O`) are now handled properly
24 +* Duplicate keys no longer cause a hard error; now a warning is logged (and only one of the children with the same key is shown)
25 +* `img` event listeners are now unbound properly, preventing the error "Two valid but unequal nodes with the same `data-reactid`"
26 +* Added explicit warning when missing polyfills
27 +
28 +### React With Addons
29 +* PureRenderMixin: a mixin which helps optimize "pure" components
30 +* Perf: a new set of tools to help with performance analysis
31 +* Update: New `$apply` command to transform values
32 +* TransitionGroup bug fixes with null elements, Android
33 +
34 +### React NPM Module
35 +* Now includes the pre-built packages under `dist/`.
36 +* `envify` is properly listed as a dependency instead of a peer dependency
37 +
38 +### JSX
39 +* Added support for namespaces, eg `<Components.Checkbox />`
40 +* JSXTransformer
41 + * Enable the same `harmony` features available in the command line with `<script type="text/jsx;harmony=true">`
42 + * Scripts are downloaded in parallel for more speed. They are still executed in order (as you would expect with normal script tags)
43 + * Fixed a bug preventing sourcemaps from working in Firefox
44 +
45 +### React Tools Module
46 +* Improved readme with usage and API information
47 +* Improved ES6 transforms available with `--harmony` option
48 +* Added `--source-map-inline` option to the `jsx` executable
49 +* New `transformWithDetails` API which gives access to the raw sourcemap data
50 +
51 +
52 ## 0.10.0 (March 21, 2014)
53
54 ### React Core
README.md
+3 -3
@@ -36,12 +36,12 @@ The fastest way to get started is to serve JavaScript from the CDN (also availab
36
37 ```html
38 <!-- The core React library -->
39 -<script src="http://fb.me/react-0.10.0.js"></script>
39 +<script src="http://fb.me/react-0.11.0.js"></script>
40 <!-- In-browser JSX transformer, remove when pre-compiling JSX. -->
41 -<script src="http://fb.me/JSXTransformer-0.10.0.js"></script>
41 +<script src="http://fb.me/JSXTransformer-0.11.0.js"></script>
42 ```
43
44 -We've also built a [starter kit](http://facebook.github.io/react/downloads/react-0.10.0.zip) which might be useful if this is your first time using React. It includes a webpage with an example of using React with live code.
44 +We've also built a [starter kit](http://facebook.github.io/react/downloads/react-0.11.0.zip) which might be useful if this is your first time using React. It includes a webpage with an example of using React with live code.
45
46 If you'd like to use [bower](http://bower.io), it's as easy as:
47
docs/_config.yml
+1 -1
@@ -13,7 +13,7 @@ redcarpet:
13 pygments: true
14 name: React
15 markdown: redcarpet
16 -react_version: 0.10.0
16 +react_version: 0.11.0
17 description: A JavaScript library for building user interfaces
18 relative_permalinks: true
19 paginate: 5
docs/_posts/2014-07-13-react-v0.11-rc1.md
-2
@@ -22,8 +22,6 @@ We've also published version `0.11.0-rc1` of the `react` and `react-tools` packa
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
25 -# Blog Post
26 -
25 ## `getDefaultProps`
26
27 Starting in React 0.11, `getDefaultProps()` is called only once when `React.createClass()` is called, instead of each time a component is rendered. This means that `getDefaultProps()` can no longer vary its return value based on `this.props` and any objects will be shared across all instances. This change improves performance and will make it possible in the future to do PropTypes checks earlier in the rendering process, allowing us to give better error messages.
docs/_posts/2014-07-17-react-v0.11.md new
+149
@@ -0,0 +1,149 @@
1 +---
2 +title: React v0.11
3 +layout: post
4 +author: Paul O’Shannessy
5 +---
6 +
7 +We're really happy to announce the availability of React v0.11. There seems to be a lot of excitement already and we appreciate everybody who gave the release candidate a try over the weekend. We made a couple small changes in response to the feedback and issues filed. We enabled the destructuring assignment transform when using `jsx --harmony`, fixed a small regression with `statics`, and made sure we actually exposed the new API we said we were shipping: `React.Children.count`.
8 +
9 +
10 +This version has been cooking for a couple months now and includes a wide array of bug fixes and features. We highlighted some of the most important changes below, along with the full changelog.
11 +
12 +The release candidate is available for download from the CDN:
13 +
14 +* **React**
15 + Dev build with warnings: <http://fb.me/react-0.11.0.js>
16 + Minified build for production: <http://fb.me/react-0.11.0.min.js>
17 +* **React with Add-Ons**
18 + Dev build with warnings: <http://fb.me/react-with-addons-0.11.0.js>
19 + Minified build for production: <http://fb.me/react-with-addons-0.11.0.min.js>
20 +* **In-Browser JSX transformer**
21 + <http://fb.me/JSXTransformer-0.11.0.js>
22 +
23 +We've also published version `0.11.0` of the `react` and `react-tools` packages on npm and the `react` package on bower.
24 +
25 +Please try these builds out and [file an issue on GitHub](https://github.com/facebook/react/issues/new) if you see anything awry.
26 +
27 +
28 +## `getDefaultProps`
29 +
30 +Starting in React 0.11, `getDefaultProps()` is called only once when `React.createClass()` is called, instead of each time a component is rendered. This means that `getDefaultProps()` can no longer vary its return value based on `this.props` and any objects will be shared across all instances. This change improves performance and will make it possible in the future to do PropTypes checks earlier in the rendering process, allowing us to give better error messages.
31 +
32 +
33 +## Rendering to `null`
34 +
35 +Since React's release, people have been using work arounds to "render nothing". Usually this means returning an empty `<div/>` or `<span/>`. Some people even got clever and started returning `<noscript/>` to avoid extraneous DOM nodes. We finally provided a "blessed" solution that allows developers to writing meaningful code. Returning `null` in an explicit indication to React that you do not want anything rendered. Behind the scenes we make this work with a `<noscript>` element, though in the future we hope to not put anything in the document. In the mean time, `<noscript>` elements do not affect layout in any way, so you can feel safe using `null` today!
36 +
37 +```js
38 +// Before
39 +render: function() {
40 + if (!this.state.visible) {
41 + return <span/>;
42 + }
43 + // ...
44 +}
45 +
46 +// After
47 +render: function() {
48 + if (!this.state.visible) {
49 + return null;
50 + }
51 + // ...
52 +}
53 +```
54 +
55 +
56 +## JSX Namespacing
57 +
58 +Another feature request we've been hearing for a long time is the ability to have namespaces in JSX. Given that JSX is just JavaScript, we didn't want to use XML namespacing. Instead we opted for a standard JS approach: object property access. Instead of assigning variables to access components stored in an object (such as a component library), you can now use the component directly as `<Namespace.Component/>`.
59 +
60 +```js
61 +// Before
62 +var UI = require('UI');
63 +var UILayout = UI.Layout;
64 +var UIButton = UI.Button;
65 +var UILabel = UI.Label;
66 +
67 +render: function() {
68 + return <UILayout><UIButton /><UILabel>text</UILabel></UILayout>;
69 +}
70 +
71 +// After
72 +var UI = require('UI');
73 +
74 +render: function() {
75 + return <UI.Layout><UI.Button /><UI.Label>text</UI.Label></UI.Layout>;
76 +}
77 +```
78 +
79 +
80 +## Improved keyboard event normalization
81 +
82 +Keyboard events now contain a normalized `e.key` value according to the [DOM Level 3 Events spec](http://www.w3.org/TR/DOM-Level-3-Events/#keys-special), allowing you to write simpler key handling code that works in all browsers, such as:
83 +
84 +```js
85 +handleKeyDown: function(e) {
86 + if (e.key === 'Enter') {
87 + // Handle enter key
88 + } else if (e.key === ' ') {
89 + // Handle spacebar
90 + } else if (e.key === 'ArrowLeft') {
91 + // Handle left arrow
92 + }
93 +},
94 +```
95 +
96 +Keyboard and mouse events also now include a normalized `e.getModifierState()` that works consistently across browsers.
97 +
98 +## Changelog
99 +
100 +### React Core
101 +
102 +#### Breaking Changes
103 +* `getDefaultProps()` is now called once per class and shared across all instances
104 +
105 +#### New Features
106 +* Rendering to `null`
107 +* Keyboard events include normalized `e.key` and `e.getModifierState()` properties
108 +* New normalized `onBeforeInput` event
109 +* `React.Children.count` has been added as a helper for counting the number of children
110 +
111 +#### Bug Fixes
112 +
113 +* Re-renders are batched in more cases
114 +* Events: `e.view` properly normalized
115 +* Added Support for more HTML attributes (`coords`, `crossOrigin`, `download`, `hrefLang`, `mediaGroup`, `muted`, `scrolling`, `shape`, `srcSet`, `start`, `useMap`)
116 +* Improved SVG support
117 + * Changing `className` on a mounted SVG component now works correctly
118 + * Added support for elements `mask` and `tspan`
119 + * Added support for attributes `dx`, `dy`, `fillOpacity`, `fontFamily`, `fontSize`, `markerEnd`, `markerMid`, `markerStart`, `opacity`, `patternContentUnits`, `patternUnits`, `preserveAspectRatio`, `strokeDasharray`, `strokeOpacity`
120 +* CSS property names with vendor prefixes (`Webkit`, `ms`, `Moz`, `O`) are now handled properly
121 +* Duplicate keys no longer cause a hard error; now a warning is logged (and only one of the children with the same key is shown)
122 +* `img` event listeners are now unbound properly, preventing the error "Two valid but unequal nodes with the same `data-reactid`"
123 +* Added explicit warning when missing polyfills
124 +
125 +### React With Addons
126 +* PureRenderMixin: a mixin which helps optimize "pure" components
127 +* Perf: a new set of tools to help with performance analysis
128 +* Update: New `$apply` command to transform values
129 +* TransitionGroup bug fixes with null elements, Android
130 +
131 +### React NPM Module
132 +* Now includes the pre-built packages under `dist/`.
133 +* `envify` is properly listed as a dependency instead of a peer dependency
134 +
135 +### JSX
136 +* Added support for namespaces, eg `<Components.Checkbox />`
137 +* JSXTransformer
138 + * Enable the same `harmony` features available in the command line with `<script type="text/jsx;harmony=true">`
139 + * Scripts are downloaded in parallel for more speed. They are still executed in order (as you would expect with normal script tags)
140 + * Fixed a bug preventing sourcemaps from working in Firefox
141 +
142 +### React Tools Module
143 +* Improved readme with usage and API information
144 +* Improved ES6 transforms available with `--harmony` option
145 +* Added `--source-map-inline` option to the `jsx` executable
146 +* New `transformWithDetails` API which gives access to the raw sourcemap data
147 +
148 +
149 +
docs/downloads/react-0.11.0.zip
Binary files /dev/null and b/docs/downloads/react-0.11.0.zip differ