@samitouri / QOS-React-2 / commits / 631705f31d

v0.11.1 release materials, update to 0.11.0 release materials

* 0.11.1 blog post, changelog * Update to 0.11.0 post, changelog * Update version in site, add starter kit

Paul O’Shannessy committed Jul 24, 2014 at 12:41 UTC 631705f31d03d310367dd3538a93c73d6e3a6682
6 files changed +87 -10
CHANGELOG.md
+18
@@ -1,9 +1,27 @@
1 +## 0.11.1 (July 24, 2014)
2 +
3 +### React Core
4 +
5 +#### Bug Fixes
6 +* `setState` can be called inside `componentWillMount` in non-DOM environments
7 +* `SyntheticMouseEvent.getEventModifierState` correctly renamed to `getModifierState`
8 +* `getModifierState` correctly returns a `boolean`
9 +* `getModifierState` is now correctly case sensitive
10 +* Empty Text node used in IE8 `innerHTML` workaround is now removed, fixing rerendering in certain cases
11 +
12 +### JSX
13 +* Fix duplicate variable declaration in JSXTransformer (caused issues in some browsers)
14 +
15 +
16 ## 0.11.0 (July 17, 2014)
17
18 ### React Core
19
20 #### Breaking Changes
21 * `getDefaultProps()` is now called once per class and shared across all instances
22 +* `MyComponent()` now returns a descriptor, not an instance
23 +* `React.isValidComponent` and `React.PropTypes.component` validate *descriptors*, not component instances
24 +* Custom `propType` validators should return an `Error` instead of logging directly
25
26 #### New Features
27 * Rendering to `null`
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.11.0.js"></script>
39 +<script src="http://fb.me/react-0.11.1.js"></script>
40 <!-- In-browser JSX transformer, remove when pre-compiling JSX. -->
41 -<script src="http://fb.me/JSXTransformer-0.11.0.js"></script>
41 +<script src="http://fb.me/JSXTransformer-0.11.1.js"></script>
42 ```
43
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.
44 +We've also built a [starter kit](http://facebook.github.io/react/downloads/react-0.11.1.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
+4 -4
@@ -1,7 +1,7 @@
1 ---
2 -baseurl: /react
2 +baseurl: "/react"
3 url: http://facebook.github.io
4 -permalink: /blog/:year/:month/:day/:title.html
4 +permalink: "/blog/:year/:month/:day/:title.html"
5 exclude:
6 - Gemfile
7 - Gemfile.lock
@@ -13,9 +13,9 @@ redcarpet:
13 pygments: true
14 name: React
15 markdown: redcarpet
16 -react_version: 0.11.0
16 +react_version: 0.11.1
17 description: A JavaScript library for building user interfaces
18 relative_permalinks: true
19 paginate: 5
20 -paginate_path: /blog/page:num/
20 +paginate_path: "/blog/page:num/"
21 timezone: America/Los_Angeles
docs/_posts/2014-07-17-react-v0.11.md
+18 -3
@@ -4,6 +4,10 @@ layout: post
4 author: Paul O’Shannessy
5 ---
6
7 +**Update:** We missed a few important changes in our initial post and changelog. We've updated this post with details about [Descriptors](#descriptors) and [Prop Type Validation](#prop-type-validation).
8 +
9 +- - -
10 +
11 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`.
12
13
@@ -95,12 +99,26 @@ handleKeyDown: function(e) {
99
100 Keyboard and mouse events also now include a normalized `e.getModifierState()` that works consistently across browsers.
101
102 +## Descriptors
103 +
104 +In our [v0.10 release notes](http://facebook.github.io/react/blog/2014/03/21/react-v0.10.html#clone-on-mount), we called out that we were deprecating the existing behavior of the component function call (eg `component = MyComponent(props, ...children)` or `component = <MyComponent prop={...}/>`). Previously that would create an instance and React would modify that internally. You could store that reference and then call functions on it (eg `component.setProps(...)`). This no longer works. `component` in the above examples will be a descriptor and not an instance that can be operated on. The v0.10 release notes provide a complete example along with a migration path. The development builds also provided warnings if you called functions on descriptors.
105 +
106 +Along with this change to descriptors, `React.isValidComponent` and `React.PropTypes.component` now actually validate that the value is a descriptor. Overwhelmingly, these functions are used to validate the value of `MyComponent()`, which as mentioned is now a descriptor, not a component instance. We opted to reduce code churn and make the migration to 0.11 as easy as possible. However, we realize this is has caused some confusion and we're working to make sure we are consistent with our terminology.
107 +
108 +## Prop Type Validation
109 +
110 +Previously `React.PropTypes` validation worked by simply logging to the console. Internally, each validator was responsible for doing this itself. Additionally, you could write a custom validator and the expectation was that you would also simply `console.log` your error message. Very shortly into the 0.11 cycle we changed this so that our validators return (*not throw*) an `Error` object. We then log the `error.message` property in a central place in ReactCompositeComponent. Overall the result is the same, but this provides a clearer intent in validation. In addition, to better transition into our descriptor factory changes, we also currently run prop type validation twice in development builds. As a result, custom validators doing their own logging result in duplicate messages. To update, simply return an `Error` with your message instead.
111 +
112 +
113 ## Changelog
114
115 ### React Core
116
117 #### Breaking Changes
118 * `getDefaultProps()` is now called once per class and shared across all instances
119 +* `MyComponent()` now returns a descriptor, not an instance
120 +* `React.isValidComponent` and `React.PropTypes.component` validate *descriptors*, not component instances.
121 +* Custom `propType` validators should return an `Error` instead of logging directly
122
123 #### New Features
124 * Rendering to `null`
@@ -144,6 +162,3 @@ Keyboard and mouse events also now include a normalized `e.getModifierState()` t
162 * Improved ES6 transforms available with `--harmony` option
163 * Added `--source-map-inline` option to the `jsx` executable
164 * New `transformWithDetails` API which gives access to the raw sourcemap data
147 -
148 -
149 -
docs/_posts/2014-07-25-react-v0.11.1.md new
+44
@@ -0,0 +1,44 @@
1 +---
2 +title: React v0.11.1
3 +layout: post
4 +author: Paul O’Shannessy
5 +---
6 +
7 +Today we're releasing React v0.11.1 to address a few small issues. Thanks to everybody who has reported them as they've begun upgrading.
8 +
9 +The first of these is the most major and resulted in a regression with the use of `setState` inside `componentWillMount` when using React on the server. These `setState` calls are batched into the initial render. A change we made to our batching code resulted in this path hitting DOM specific code when run server-side, in turn throwing an error as `document` is not defined.
10 +
11 +There are several fixes we're including in v0.11.1 that are focused around the newly supported `event.getModifierState()` function. We made some adjustments to improve this cross-browser standardization.
12 +
13 +The final fix we're including is to better support a workaround for some IE8 behavior. The edge-case bug we're fixing was also present in v0.9 and v0.10, so while it wasn't a short-term regression, we wanted to make sure we support IE8 to the best of our abilities.
14 +
15 +We'd also like to call out a couple additional breaking changes that we failed to originally mention in the release notes for v0.11. We updated that blog post and the changelog, so we encourage you to go read about the changes around [Descriptors](/react/blog/2014/07/17/react-v0.11.html#descriptors) and [Prop Type Validation](/react/blog/2014/07/17/react-v0.11.html#prop-type-validation).
16 +
17 +The release is available for download from the CDN:
18 +
19 +* **React**
20 + Dev build with warnings: <http://fb.me/react-0.11.1.js>
21 + Minified build for production: <http://fb.me/react-0.11.1.min.js>
22 +* **React with Add-Ons**
23 + Dev build with warnings: <http://fb.me/react-with-addons-0.11.1.js>
24 + Minified build for production: <http://fb.me/react-with-addons-0.11.1.min.js>
25 +* **In-Browser JSX transformer**
26 + <http://fb.me/JSXTransformer-0.11.1.js>
27 +
28 +We've also published version `0.11.1` of the `react` and `react-tools` packages on npm and the `react` package on bower.
29 +
30 +Please try these builds out and [file an issue on GitHub](https://github.com/facebook/react/issues/new) if you see anything awry.
31 +
32 +## Changelog
33 +
34 +### React Core
35 +
36 +#### Bug Fixes
37 +* `setState` can be called inside `componentWillMount` in non-DOM environments
38 +* `SyntheticMouseEvent.getEventModifierState` correctly renamed to `getModifierState`
39 +* `getModifierState` correctly returns a `boolean`
40 +* `getModifierState` is now correctly case sensitive
41 +* Empty Text node used in IE8 `innerHTML` workaround is now removed, fixing rerendering in certain cases
42 +
43 +### JSXTransformer
44 +* Fix duplicate variable declaration (caused issues in some browsers)
docs/downloads/react-0.11.1.zip
Binary files /dev/null and b/docs/downloads/react-0.11.1.zip differ