You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

1.4 KiB

id title permalink prev next
addons-zh-CN 插件 addons-zh-CN.html tooling-integration-zh-CN.html animation-zh-CN.html

React.addons 是我们放置一些用来构建React apps的有用的工具的地方。 这些应该被认为是实验性的 但是最终批量进入核心代码或者一个有用的工具库中:

下面的插件只存在开发版(未压缩)React中:

  • TestUtils, 用于写测试用例的简单的辅助工具(仅存在于未压缩版本)。
  • Perf, 用于测量性能并给你提示哪里可以优化。

要获取插件,使用 react-with-addons.js (和它的压缩副本)而不是通常的 react.js

当从npm使用react包时,简单的用require('react/addons') 代替 require('react') 来获取带有所有插件的React。