内容简介:React 16.3.0 已发布,React 是 Facebook 推出的一个为数据提供渲染为 HTML 视图,用来构建用户界面的开源 JavaScript 库。 React 视图通常采用包含以自定义 HTML 标记规定的其他组件的组件渲染。React 为程序员提...
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.FragmentReplace
React.unstable_AsyncComponentwithReact.unstable_AsyncModeImprove the error message when calling
setState()on an unmounted component.
React DOM
Add a new
getDerivedStateFromProps()lifecycle andUNSAFE_aliases for the legacy lifecycles.Add a new
getSnapshotBeforeUpdate()lifecycleAdd a new
<React.StrictMode>wrapper to help prepare apps for async rendering.Add support for
onLoadandonErrorevents on the<link>tagAdd support for
noModuleboolean attribute on the<script>tagFix minor DOM input bugs in IE and Safari
Correctly detect Ctrl + Enter in
onKeyPressin more browsersFix containing elements getting focused on SSR markup mismatch
Fix
valueanddefaultValueto ignore Symbol valuesFix 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
operawith anullvalueDon'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 ofReactDOM.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.stateof 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
nullfor 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/persistentfor building renderers that use persistent data structures.Pass host context to
finalizeInitialChildren().Remove
useSyncSchedulingfrom the host config.
React Call Return (Experimental)
Fix a crash on updates.
下载地址:https://github.com/facebook/react/releases/tag/v16.3.0
【声明】文章转载自:开源中国社区 [http://www.oschina.net]
以上就是本文的全部内容,希望对大家的学习有所帮助,也希望大家多多支持 码农网
猜你喜欢:- [译] 如何理智地构建复杂用户界面
- React 16.13.1 发布,构建用户界面的 JavaScript 库
- React 15.6.1 发布,构建用户界面的 JavaScript 库
- React 15.6.0 发布,构建用户界面的 JavaScript 库
- React 16.2.0 发布,构建用户界面的 JavaScript 库
- React 16.2.0 发布,构建用户界面的 JavaScript 库
本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们。
网络、群体与市场
大卫·伊斯利(David Esley)、乔恩·克莱因伯格(Jon Kleinberg) / 李晓明、王卫红、杨韫利 / 清华大学出版社 / 2011-10-1 / CNY 69.00
过去十年来,现代社会中复杂的连通性向公众展现出与日俱增的魅力。这种连通性在许多方面都有体现并发挥着强大的作用,包括互联网的快速成长、全球通信的便捷,以及新闻与信息(及传染病与金融危机)以惊人的速度与强度传播的能力。这种现象涉及网络、动机和人们的聚合行为。网络将人们的行为联系起来,使得每个人的决定可能对他人产生微妙的后果。 本书是本科生的入门教材,同时也适合希望进入相关领域的高层次读者。它从交......一起来看看 《网络、群体与市场》 这本书的介绍吧!