Skip to content

sombriks/koa-webc-examples

Repository files navigation

koa-webc-examples

Samples of koa-webc middleware

Basic usage of this Koa-WebC middleware

Sampling how WebC scopes styles, scripts and provides a uid attribute to keep unique id's inside a component

How to import one component inside another, so you can modularize your templates

Combining several Koa middlewares into the same project, so you get all the nice stuff from Koa ecosystem

Every WebC template gets injected with Koa context from the handler, you have to do nothing

However, in order to offer a more clean way to feed your templates with data, you can pass extra data to it when defining the middleware and also when calling ctx.render()

New in WebC 0.11.0. Loop syntax landed, this is how it works.

If you don't want to express how to import components explicitly, pass the defineComponents to koa-webc, so it will pass it to WebC so you don't have to webc:import every single component you wish to use.

About

samples of koa-webc middleware

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published