react-sdk
react-sdk copied to clipboard
Feature Request: `useDecisions` hook
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.
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
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 😁 )