Open
Description
I see from the blocks-template repo that blocks are React components. This means that custom blocks builders have to use React, and possibly a specific version of React.
If blocks were web components there would be a few advantages:
- They could bring their own renderer, be it React, Vue, Lit, etc.
- They could bring a specific version of their renderer and not have to use the host environment's version.
- They would be runtime encapsulated against other blocks styles
- Many existing components, regardless of whether they were built with React or something else, could potentially used as blocks.
- They would work in standard Markdown files, which already supports HTML, and therefore custom elements.
This seems similar to the discussion (and name!) to the Blocks Protocol, which has oriented a bit more around custom elements as a way for blocks to bring their own rendering library: https://blockprotocol.org/docs/developing-blocks#choosing-your-approach.
Web components can take complex objects as properties, so they could receive the same BlockProps as the React components.
Metadata
Metadata
Assignees
Labels
No labels