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

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

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

  更新内容:

  React

  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 wrapper to help prepare apps for async rendering.

  Add support for onLoad and onError events on the tag

  Add support for noModule boolean attribute on the  

posted @ 2018-09-04 10:17  雷林鹏  阅读(170)  评论(0编辑  收藏  举报