Web Components #107
Replies: 1 comment
-
Thanks for the suggestion 🙌 Unfortunately we likely cannot support arbitrary frontend frameworks any time soon because we need to integrate deeply with the rendering process of a component in order to support component-level sandboxing which is an essential requirement of the engine. afaik this can only be accomplished by choosing a rendering engine and writing code which is specific to it. BOS Components become Preact components when running in their sandbox, and it is possible to create Web Components with Preact, but we inject custom Preact code into each component before rendering. We rely on Preact to perform reconciliation and identify render updates to be passed outside of the hidden execution sandbox for visual display on the page. That being said, Web Components can be rendered by Preact, so once we support arbitrary dependencies it may be possible to include Web Components in your BOS Component. Some thoughts on the futureTheoretically, we might be able to extend this at some point such that a component which does not want to use Preact is wrapped under the hood in a thin Preact component only responsible for the custom rendering pieces. It is also possible that Web Engine implementations could be built out for each other popular framework, but that would be a significant development effort. |
Beta Was this translation helpful? Give feedback.
-
Hey,
The upcoming version of BOS web engine focuses on being compatible with React, but I would have loved to not put the focus on only being compatible with a single UI library.
My idea is that the engine should support Web Components, which is a web standard that many UI libraries can compile their components into.
This would give BOS component developers the freedom to choose their preferred UI library. I know that Angular and Svelte can compile to Web Components and I'd assume it's also possible with React and Vue. The used npm libraries are probably also bundled inside the BOS component.
Have you already considered Web Components?
Beta Was this translation helpful? Give feedback.
All reactions