vtex / faststore

Digital commerce toolkit for frontend developers
https://faststore.dev
MIT License
186 stars 58 forks source link

RFC: FastStore Feature Flag / Experimentation #2322

Open batzlerg opened 3 months ago

batzlerg commented 3 months ago

Describe the feature you'd like Support for injecting feature flag / experiment values at the top level of the app, to be consumed anywhere.

Proposed implementation is a top-level context + provider, populated by a user-defined function to provide experiment values which implements a specified interface. The provider can then wrap the core Component in _app.tsx, like the current UIProvider implementation.

Describe alternatives you've considered A GraphQL API extension which allows users to query experiment values along with data. Rejected internally due to lack of flexibility in use cases such as running experiments inside API resolvers, preferred

Additional context An RFC doc with more specific implementation ideas will be provided to the VTEX FastStore Experience team.