https://github.com/ratfactor/retrov
A tiny browser-native Virtual DOM rendering library.
https://github.com/ratfactor/retrov
dom-diff dom-diffing hyperscript javascript-library virtual-dom
Last synced: 10 months ago
JSON representation
A tiny browser-native Virtual DOM rendering library.
- Host: GitHub
- URL: https://github.com/ratfactor/retrov
- Owner: ratfactor
- License: mit
- Archived: true
- Created: 2023-03-13T13:09:24.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2023-09-27T22:40:39.000Z (about 2 years ago)
- Last Synced: 2025-02-12T09:12:18.269Z (10 months ago)
- Topics: dom-diff, dom-diffing, hyperscript, javascript-library, virtual-dom
- Language: HTML
- Homepage: http://ratfactor.com/retrov/
- Size: 115 KB
- Stars: 9
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README

**MOVED!** Hello, I am moving my repos to http://ratfactor.com/repos/
and setting them to read-only ("archived") on GitHub. Thank you, *-Dave*
# RetroV
RetroV (pronounced "retro vee") is a virtual DOM (VDOM) rendering library.
It is browser-native and has no dependencies or build system.
It’s tiny: **1129 bytes** (the usual minified gzipped metric).
Read more on the World Wide Web here:
http://ratfactor.com/retrov/
## Installation
```
```
## Example
Here's a quick glimpse (a whole web page!):
```
RV.render(
document.body,
['div',
['h1', 'Hello'],
['p', 'Hello world, this is ',
['em', 'RetroV'],
'!',
]
]
);
```
For more examples and fairly complete **tutorial**, take a look at
at `demo.html` in this repo or see it live here:
http://ratfactor.com/retrov/demo.html
You can also run the test suite `test.html` or run it live:
http://ratfactor.com/retrov/test.html
## Why?
I couldn't find anything exactly like it. Lots of bits and pieces
I liked, but not this exact thing.
## Inspiration
[.dom](https://github.com/wavesoft/dot-dom/) -
Full hyperscript and DOM diff in 512 bytes! A direct inspiration. In fact, I
was originally going to fork this and change it to suit my preferences until I
decided to go in a radically different direction for VNode creation.
[Mithril](https://github.com/MithrilJS/mithril.js/) -
My old favorite, still getting updates. This is how I learned these practices
and it's the standard by which I judge them.
[ijk](https://github.com/lukejacksonn/ijk) -
DOM without the 'h()' function - pure JS data structures.
I _think_ I'd seen this concept before, but maybe not. At any rate, this
has heavily influenced RetroV. This library is for transforming data,
not rendering. Super compact code!