DEV Community

Discussion on: Component Libraries with Stencil.js - Decorators

Collapse
lalitkushwah profile image
LalitKushwah

Hey John,
Great article, Can you please share what are the usage of host, assetDir and assetDirs in component decorator

Collapse
johnbwoodruff profile image
John Woodruff Author

Sorry this is months late, life got crazy and now here we are haha. The host property is replaced with the <Host> virtual component. This allows you to specify attributes and classes on the host element itself rather than the containing elements. See the docs for details.

As for assetDirs, it allows you to specify directories from which assets your component uses such as images come from.