An open API service indexing awesome lists of open source software.

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.

Awesome Lists containing this project

README

          

RetroV 1970s colors svg logo

**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!