UNPKG
choo-shortcache
Version:
latest (0.0.0)
0.0.0
choo nanocomponent cache shortcut
choo-shortcache
/
example
/
view.js
11 lines
(10 loc)
•
241 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
var
html =
require
(
'choo/html'
)
var
{ cache } =
require
(
'..'
)
var
MyComponent
=
require
(
'./component'
)
module
.
exports
=
function
(
state, emit
) {
return
html`
<
body
>
${cache(MyComponent,
'MyComponent'
).render()}
</
body
>
`
}