React 16.3.0 发布,构建用户界面的 JavaScript 库

栏目: 软件资讯 发布于: 2018-03-30 08:50:02

React 16.3.0 已发布,React 是 Facebook 推出的一个为数据提供渲染为 HTML 视图,用来构建用户界面的开源 JavaScript 库。

React 视图通常采用包含以自定义 HTML 标记规定的其他组件的组件渲染。React 为程序员提供了一种子组件不能直接影响外层组件("data flows down")的模型,数据改变时对 HTML 文档的有效更新,和现代单页应用中组件之间干净的分离。



  • Add a new officially supported context API

  • Add a new React.createRef() API as an ergonomic alternative to callback refs.

  • Add a new React.forwardRef() API to let components forward their refs to a child. 

  • Fix a false positive warning in IE11 when using React.Fragment

  • Replace React.unstable_AsyncComponent with React.unstable_AsyncMode

  • Improve the error message when calling setState() on an unmounted component.

React DOM

  • Add a new getDerivedStateFromProps() lifecycle and UNSAFE_ aliases for the legacy lifecycles. 

  • Add a new getSnapshotBeforeUpdate() lifecycle

  • Add a new <React.StrictMode> wrapper to help prepare apps for async rendering. 

  • Add support for onLoad and onError events on the <link> tag

  • Add support for noModule boolean attribute on the <script> tag

  • Fix minor DOM input bugs in IE and Safari

  • Correctly detect Ctrl + Enter in onKeyPress in more browsers

  • Fix containing elements getting focused on SSR markup mismatch

  • Fix value and defaultValue to ignore Symbol values

  • Fix refs to class components not getting cleaned up when the attribute is removed. 

  • Throw with a meaningful message if the component runs after jsdom has been destroyed. 

  • Don't crash if there is a global variable called opera with a null value

  • Don't check for old versions of Opera

  • Deduplicate warning messages about <option selected>

  • Deduplicate warning messages about invalid callback

  • Deprecate ReactDOM.unstable_createPortal() in favor of ReactDOM.createPortal()

  • Don't emit User Timing entries for context types

  • Improve the error message when context consumer child isn't a function. 

  • Improve the error message when adding a ref to a functional component. 

React DOM Server

  • Prevent an infinite loop when attempting to render portals with SSR.

  • Warn if a class doesn't extend React.Component

  • Fix an issue with this.state of different components getting mixed up.

  • Provide a better message when component type is undefined.

React Test Renderer

  • Fix handling of fragments in toTree()

  • Shallow renderer should assign state to null for components that don't set it. 

  • Shallow renderer should filter legacy context according to contextTypes

  • Add an unstable API for testing asynchronous rendering.

React Is (New)

  • First release of the new package that libraries can use to detect different React node types. 

  • Add ReactIs.isValidElementType() to help higher-order components validate their inputs. 

React Lifecycles Compat (New)

  • First release of the new package to help library developers target multiple versions of React. 

Create Subscription (New)

  • First release of the new package to subscribe to external data sources safely for async rendering. 

React Reconciler (Experimental)

  • Expose react-reconciler/persistent for building renderers that use persistent data structures. 

  • Pass host context to finalizeInitialChildren().

  • Remove useSyncScheduling from the host config.

React Call Return (Experimental)

  • Fix a crash on updates.


【声明】文章转载自:开源中国社区 []

转载请注明:文章转载自 []
本文标题:React 16.3.0 发布,构建用户界面的 JavaScript 库
Sasba Pacbev (作者), 李芳 (译者), 于红芸 (译者), 邵健 (译者)
《深入理解MySQL核心技术》:从公共可用性的意义上讲,MySQL源代码是开放源代码,但如果对其不了解,则实质上,它对于您来说是封闭的。MysQL开发团队的前成员Sasha Pachev通过《深入理解MySQL核心技术》给出了MySQL 5的全面指南,揭示了这一强大数据库的内部运作。您将直奔MySQL核心技术,了解各种数据结构和各种方便的功能的运作情况,了解如何添加新的存储引擎和配置选项等。 《深入理解MySQL核心技术》从结构概况讲起,在这一部分解释了MysQL的不同组件是如何协同工作的。接着将学习设置有效的可编译代码副本的步骤,然后使用基本架构添加自己的配置变量和存储引擎。