Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: useDecisions hook #136

Open
ivanngbowtie opened this issue Nov 29, 2021 · 2 comments
Open

Feature Request: useDecisions hook #136

ivanngbowtie opened this issue Nov 29, 2021 · 2 comments

Comments

@ivanngbowtie
Copy link

The current useDecision hook can only work with one feature flag and return only one OptimizelyDecision.

In situation where more than one decision is needed, a useDecisions hook can be used rather than using multiple useDecision hooks. This is especially important for cases where the flags used would change dynamically, for example a switchByFeatureFlags function, which accept multiple flags as argument.

@celineotter
Copy link

bumping,

what is the recommended way to handle a view that might have multiple a/b tests / assigned decision variants please?

Is there a way to see all the a/b test decisions that a user has been assigned on instead of having to check "useDecision" on each flag and handling "didTimeout" and "isClientReady" on each flag please?

Much appreciated

@mikechu-optimizely
Copy link
Contributor

I've created an internal work ticket (FSSDK-9620) for this.

Question (and please forgive my in-progress React knowledge): could we separate out by component where useDecision() is used ie react inside each component separately (I'm sort of guess at the implementation too here 😁 )

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants