高性能迷你React框架anujs1.1.0發佈

本版本對setState與forceUpdate內部依賴的setStateImpl進行了重構,性能穩定在60pfs之上。而且將組件實例的全部內部方法與屬性都改爲以___開頭。node

clipboard.png
clipboard.png

https://github.com/RubyLouvre...react

  1. disabled的元素不能觸發點擊事件webpack

  2. 修正mouseenter/mouseleave在IE6-8中的BUG,涉及到relatedTarget的正確獲取與LCA處理git

  3. 簡化alignVnode的邏輯,減小插入列隊的生成github

  4. 重構setStateImpl,實現以列隊爲基礎的異步更新web

  5. _component改名爲__component, _currentElement改名爲__currentnpm

  6. react/lib中添加一些簡用的外圍模塊,如ReactComponentWithPureRenderMixin,shallowCompare,sliceChildrendom

使用異步

npm i anujs

或者使用架手架 https://github.com/Levan-Du/a...性能

npm i -g anu-cli

webpack.config中如何代替原來用React編寫的項目

resolve: {
   alias: {
      'react': 'anujs',
      'react-dom': 'anujs',
      'react-tap-event-plugin': 'anujs/lib/injectTapEventPlugin',  //若是你在移動端用到了onTouchTap事件
   }
},

歡迎你們爲anujs加星星與試用!!!

相關文章
相關標籤/搜索