1 | ## Hyperscript
|
2 |
|
3 | `r` is a helper for `document.createElement` with couple of differences.
|
4 | The basic idea is to simply create elements with `r` and mount them with `mount`, almost like you would do with plain JavaScript:
|
5 |
|
6 | ```js
|
7 | import { r, mount } from 'radi';
|
8 |
|
9 | const hello = r('h1', {}, 'Hello Radi!');
|
10 |
|
11 | mount(hello, document.body);
|
12 | ```
|
13 |
|
14 | ```html
|
15 | <body>
|
16 | <h1>Hello Radi!</h1>
|
17 | </body>
|
18 | ```
|