高性能迷你React框架anujs1.0.6发布

#1

本版本的的主要更新

  1. 重新支持chrome DevTools
  2. 添加对Immutable.js的支持
  3. 修复用户在componentWillUpdate/shouldComponentUpdate/componentDidUpdate钩子中执行setState引发死循环的BUG

使用

npm i anujs

或者使用架手架 https://github.com/Levan-Du/anu-cli12

npm i -g anu-cli

webpack.config中如何代替原来用React编写的项目

resolve: {
   alias: {
      'react': 'anujs',
      'react-dom': 'anujs',
      'react-tap-event-plugin': 'anujs/lib/injectTapEventPlugin',  //如果你在移动端用到了onTouchTap事件
   }
},
1 Like