Browse Source

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
main
Paul O’Shannessy 10 years ago
parent
commit
32334801dc
  1. 8
      _config.yml
  2. 21
      _posts/2014-07-17-react-v0.11.md
  3. 44
      _posts/2014-07-25-react-v0.11.1.md
  4. BIN
      downloads/react-0.11.1.zip

8
_config.yml

@ -1,7 +1,7 @@
---
baseurl: /react
baseurl: "/react"
url: http://facebook.github.io
permalink: /blog/:year/:month/:day/:title.html
permalink: "/blog/:year/:month/:day/:title.html"
exclude:
- Gemfile
- Gemfile.lock
@ -13,9 +13,9 @@ redcarpet:
pygments: true
name: React
markdown: redcarpet
react_version: 0.11.0
react_version: 0.11.1
description: A JavaScript library for building user interfaces
relative_permalinks: true
paginate: 5
paginate_path: /blog/page:num/
paginate_path: "/blog/page:num/"
timezone: America/Los_Angeles

21
_posts/2014-07-17-react-v0.11.md

@ -4,6 +4,10 @@ layout: post
author: Paul O’Shannessy
---
**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).
- - -
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`.
@ -95,12 +99,26 @@ handleKeyDown: function(e) {
Keyboard and mouse events also now include a normalized `e.getModifierState()` that works consistently across browsers.
## Descriptors
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.
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.
## Prop Type Validation
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.
## Changelog
### React Core
#### Breaking Changes
* `getDefaultProps()` is now called once per class and shared across all instances
* `MyComponent()` now returns a descriptor, not an instance
* `React.isValidComponent` and `React.PropTypes.component` validate *descriptors*, not component instances.
* Custom `propType` validators should return an `Error` instead of logging directly
#### New Features
* Rendering to `null`
@ -144,6 +162,3 @@ Keyboard and mouse events also now include a normalized `e.getModifierState()` t
* Improved ES6 transforms available with `--harmony` option
* Added `--source-map-inline` option to the `jsx` executable
* New `transformWithDetails` API which gives access to the raw sourcemap data

44
_posts/2014-07-25-react-v0.11.1.md

@ -0,0 +1,44 @@
---
title: React v0.11.1
layout: post
author: Paul O’Shannessy
---
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.
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.
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.
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.
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).
The release is available for download from the CDN:
* **React**
Dev build with warnings: <http://fb.me/react-0.11.1.js>
Minified build for production: <http://fb.me/react-0.11.1.min.js>
* **React with Add-Ons**
Dev build with warnings: <http://fb.me/react-with-addons-0.11.1.js>
Minified build for production: <http://fb.me/react-with-addons-0.11.1.min.js>
* **In-Browser JSX transformer**
<http://fb.me/JSXTransformer-0.11.1.js>
We've also published version `0.11.1` of the `react` and `react-tools` packages on npm and the `react` package on bower.
Please try these builds out and [file an issue on GitHub](https://github.com/facebook/react/issues/new) if you see anything awry.
## Changelog
### React Core
#### Bug Fixes
* `setState` can be called inside `componentWillMount` in non-DOM environments
* `SyntheticMouseEvent.getEventModifierState` correctly renamed to `getModifierState`
* `getModifierState` correctly returns a `boolean`
* `getModifierState` is now correctly case sensitive
* Empty Text node used in IE8 `innerHTML` workaround is now removed, fixing rerendering in certain cases
### JSXTransformer
* Fix duplicate variable declaration (caused issues in some browsers)

BIN
downloads/react-0.11.1.zip

Binary file not shown.
Loading…
Cancel
Save