The spec now supports creating independent, non-singleton instances of the OpenFeature API. Each instance has its own providers, context, hooks, and events; totally separate from the global singleton and from each other. This is useful for things like micro-frontends, DI, and testing.
What needs to happen
- Add a factory function that creates new, independent API instances
- Each instance should conform to the same API contract as the existing singleton
- Ideally the factory lives in a distinct module/entrypoint for discoverability (recommended, not required)
- A single provider instance shouldn't be bound to more than one API instance at a time
Prior art
There's already significant work here:
Links
The spec now supports creating independent, non-singleton instances of the OpenFeature API. Each instance has its own providers, context, hooks, and events; totally separate from the global singleton and from each other. This is useful for things like micro-frontends, DI, and testing.
What needs to happen
Prior art
There's already significant work here:
Links