4 ms·
So this seems to be a wrapper around web components, which might make web components easier to use in frameworks. By providing types, one could build a generato
by lucasmullens 5y ago
So this seems to be a wrapper around web components, which might make web components easier to use in frameworks. By providing types, one could build a generator that takes a Block and creates a strongly-typed React/Vue/Svelte component, or even mobile components using a webview.
- danecjensen 5y agoCan you elaborate on this? Why can't you make a generator for regular web components?
- lucasmullens 5y agoYou can, but knowing a certain property on the web component is an integer isn't easy with static analysis alone. Somehow you need some more rigid way to declare types to guarantee all generated components can be strongly typed.
- yesimahuman 5y agoStencil has this feature btw: build a web component and it can output the strongly-typed React/Angular/Vue bindings to consume it natively in those frameworks.
- spankalee 5y agoThe Web Components Community Group is developing such a format to describe the types of components here: https://github.com/webcomponents/custom-elements-manifest https://github.com/webcomponents/custom-elements-manifest People have already built tools that generate wrappers based on it.