非死book開源的用戶界面的 JavaScript 構建庫,React v0.12 發布
React v0.12 發布,此版本引入了新術語;修改了 APIs,使得 React 一些概念更簡潔。 同時還對 JSX 做了一些修改,飛起了一些函數。
此版本現已提供下載:
React
Dev build with warnings: http://fb.me/react-0.12.0.js
Minified build for production: http://fb.me/react-0.12.0.min.jsReact with Add-Ons
Dev build with warnings: http://fb.me/react-with-addons-0.12.0.js
Minified build for production: http://fb.me/react-with-addons-0.12.0.min.jsIn-Browser JSX transformer
http://fb.me/JSXTransformer-0.12.0.js
React 團隊通過發布了 react
和 react-tools
0.12.0
包到 npm 和 react
包到 bower。
更多內容請看這里。
Changelog
React Core
重大改進
key
andref
moved off props object, now accessible on the element directlyReact is now BSD licensed with accompanying Patents grant
Default prop resolution has moved to Element creation time instead of mount time, making them effectively static
React.__internals
is removed - it was exposed for DevTools which no longer needs accessComposite Component functions can no longer be called directly - they must be wrapped with
React.createFactory
first. This is handled for you when using JSX.
新特性
Spread operator (
{...}
) introduced to deprecatethis.transferPropsTo
Added support for more HTML attributes:
acceptCharset
,classID
,manifest
廢棄
React.renderComponent
-->React.render
React.renderComponentToString
-->React.renderToString
React.renderComponentToStaticMarkup
-->React.renderToStaticMarkup
React.isValidComponent
-->React.isValidElement
React.PropTypes.component
-->React.PropTypes.element
React.PropTypes.renderable
-->React.PropTypes.node
DEPRECATED
React.isValidClass
DEPRECATED
instance.transferPropsTo
DEPRECATED Returning
false
from event handlers to preventDefaultDEPRECATED Convenience Constructor usage as function, instead wrap with
React.createFactory
DEPRECATED use of
key={null}
to assign implicit keys
Bug 修復
Better handling of events and updates in nested results, fixing value restoration in "layered" controlled components
Correctly treat
event.getModifierState
as case sensitiveImproved normalization of
event.charCode
Better error stacks when involving autobound methods
Removed DevTools message when the DevTools are installed
Correctly detect required language features across browsers
Fixed support for some HTML attributes:
list
updates correctly nowscrollLeft
,scrollTop
removed, these should not be specified as propsImproved error messages
React With Addons
新特性
React.addons.batchedUpdates
added to API for hooking into update cycle
重大改進
React.addons.update
usesassign
instead ofcopyProperties
which doeshasOwnProperty
checks. Properties on prototypes will no longer be updated correctly.
Bug 修復
Fixed some issues with CSS Transitions
JSX
重大改進
Enforced convention: lower case tag names are always treated as HTML tags, upper case tag names are always treated as composite components
JSX no longer transforms to simple function calls
新特性
@jsx React.DOM
no longer requiredspread (
{...}
) operator introduced to allow easier use of props
Bug 修復
JSXTransformer: Make sourcemaps an option when using APIs directly (eg, for react-rails)
React.js 是 非死book 推出的一個用來構建用戶界面的 JavaScript 庫。
非死book開源了React,這是該公司用于構建反應式圖形界面的JavaScript庫,已經應用于構建Instagram網站及
非死book部分網站。最近出現了AngularJS、MeteorJS 和Polymer中實現的Model-Driven
Views等框架,React也順應了這種趨勢。React基于在數據模型之上聲明式指定用戶界面的理念,用戶界面會自動與底層數據保持同步。與前面提及
的框架不同,出于靈活性考慮,React使用JavaScript來構建用戶界面,沒有選擇HTML。
來自:http://www.oschina.net/news/56550/react-v0-12