The purpose with this library was too see how much of React's component API I could re-use in a new library without replicating React itself.
This is not an attempt to reinvent the wheel. We already have Angular, React and other great libraries such as Inferno, Kivi and Cito.
What is the idea behind this?
Wirwox is a result of my research on the virtual DOM concept. It's far from complete, but it works and it's 100% React compatible in a small size core. You can do almost the exact things when it comes to the component API.
How to use
From React, Wirwox uses a few of the same functions.
You use this in the same way. To create virtual elements, you can do:
Wirwox;Wirwox; // functional or component
To unmount, you can do:
Things to fix
Note! Be aware that things that isn't fixed or implemented yet, will probably not be it either.
Here is a short list for things that need to be fixed with a reference to other Vdom implementations:
- proper children diffing algorithm - Inferno, Kivi and Cito
- proper diffing of attributes, properties, and style - Kivi
- support for string text nodes - Cito, Inferno, Kivi
- RenderToString - React
- Add support for the new features added in React 15.x
- Improved ref support for components
- Lifecycle hooks for stateless components - Inferno
- Splitting into packages - React, Inferno
- JSX (React JSX plugin may work)
- Event system - React
- Bug fixes
- Major improvements
Note! First priority is to move the cache solution from the DOM node itself to the virtual DOM object to gain better performance.