Anujs1.3.0 is a high-performance React-like framework that is currently the best react16-compatible mini-library in the world.
Since React16, new apis such as createContext, createPortal, createRef, and createResource have been released, indicating that officials are actively evolving from a pure View library to a larger and more comprehensive framework that will continue to be useful. Some of the mini-libraries may not be able to keep up, and for now only Anujs can keep up.
The improvements in 1.3.0 are as follows:
- Support for the createContext New API of React16.3
- Added lots of react. Fragment tests and fixed some edge bugs
- Update diff mechanism to compare fiber with new VNode instead of old and new vNode, update Fiber and view with data from new VNode
- Add onChange event support for input[type=search]
- Fixed an edge BUG with portal in antd3.0 (insert twice twice, causing text node to disappear)
-
Property and method names have been changed to be closer to Fiber in React16
-
vnode.vtype
–> fiber.tag -
instance.__isStateless
–> fiber._isStateless -
updater
–> fiber -
updater.vnode
–> fiber._reactInternalFiber -
updater.willReceive
–> fiber._willReceive -
updater.children
–> fiber._children -
updater.isMounted()
–> fiber._isMounted() -
updater.insertCarrier
–> fiber._mountCarrier -
updater.insertPoint
–> fiber._mountPoint -
updater.parentContext
–> fiber._unmaskedContext -
getChildContext
–> getUnmaskedContext -
getContextByTypes
–> 为getMaskedContext -
CompositeUpdater.js
–> ComponentFiber.js` -
DOMUpdater.js
–> HostFiber.js
-
use
npm i anujsCopy the code
Or use the rack rack github.com/Levan-Du/a….
npm i -g anu-cliCopy the code
How to replace React projects in webpack.config
Resolve: {alias: {'react': 'anujs', 'react-dom': 'anujs', // 'anujs/dist/ReactIE', // 'react-dom': 'anujs/dist/ReactIE', // if prop-types or create-react-class are referenced, the following alias 'prop-types' should be added: 'anujs/lib/ReactPropTypes', 'create-react-class': 'anujs/lib/createClass' / / if you are in the mobile terminal USES onTouchTap events' react - tap - event - the plugin ':' anujs/lib/injectTapEventPlugin '}},Copy the code
Welcome to add stars and try out anujs!!
Github.com/RubyLouvre….