高性能迷你React框架anujs1.1.1发布
anujs1.1.1为了兼容国内最著名的UI库antd,在虚拟DOM树结构,ref机制,owner机制,svg的兼容上做了大量改进。到目前为止,只差两个组件没有兼容,相信下一个版本会搞定的。antd内部使用了大量的旧API与hack react的实现,因此兼容了antd,对其他比较正规的UI库,anujs也肯定能支持的。
https://github.com/RubyLouvre... 主要改良点:
使用 npm i anujs 或者使用架手架 https://github.com/Levan-Du/a... npm i -g anu-cli webpack.config中如何代替原来用React编写的项目 resolve: { alias: { 'react': 'anujs','react-dom': 'anujs',// 若要兼容 IE 请使用以下配置 // 'react': 'qreact/dist/ReactIE',// 'react-dom': 'qreact/dist/ReactIE',// 如果引用了 prop-types 或 create-react-class // 需要添加如下别名 'prop-types': 'qreact/lib/ReactPropTypes','create-react-class': 'qreact/lib/createClass' //如果你在移动端用到了onTouchTap事件 'react-tap-event-plugin': 'anujs/lib/injectTapEventPlugin',} }, 欢迎大家为anujs加星星与试用!!! https://github.com/RubyLouvre... (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |