Create a way to reuse configs across implementations
Opened this issue · 0 comments
Part of the motivation behind this library is to be able to declare the interface you want in implementation-agnostic terms. It's currently possible to declare a bunch of component registry types and subsequently declare a corresponding configuration. However, it's completely possible to have the types declared but nothing in the runtime registry, resulting in a runtime exception.
Ideally, there would be a way to declare the types and a corresponding configuration, but not be able to, say, use that configuration for anything meaningful (like passing to a component to render) without adding an implementation to the runtime registry. It gets more complicated, though 😭
To pass that configuration to, say, a React component, should we require all configurations have a corresponding React implementation? To what extend can we mix-and-match implementations? E.g., we can potentially proxy data and function calls between an Angular and React component, similarly between Svelte and Custom Elements, etc., but some would work more easily than others out of the box.
Keeping the configuration agnostic of implementation details affords a couple of interesting abilities:
- Mix/match/swap implementations without touching configurations
- Reuse configurations across projects built with different implementations (e.g., one in React, another in Swift, another in Java...)