Declarative web generator
const { pipe, get } = rubico
const { Div, Section, Span, H1, H2, H3, H4, P, Button } = ardra
const makeRequest = fetch('https://jsonplaceholder.typicode.com/todos/1')
const root = Div([
H1('hey'),
Section([
P('yo'),
Button('click me', {
onClick: pipe([
makeRequest,
]),
}),
]),
Section(
Div('ayo', {
style: get('divStyle'),
}),
),
]) // function
ardra.render(root, document.body)({
divStyle: { backgroundColor: 'pink' },
})
- vanilla JS, no transpiling
- use latest web technologies
- separate environments by concern
dev -> ardra -> WebAPIs
> npm i --save ardra
npx ardra index.js // outputs html to the console