react-sdk
react-sdk copied to clipboard
Add ability to conditionally render experimentation hooks
Description
We'd like to be able to render useExperiment() and the other hooks conditionally. This PR will add the ability for people to run useExperiment('experiment_key', { disabled: true }) to skip the execution of the hook.
This is a solid addition. I've added a Jira ticket for this (FSSDK-9627; need to add tests, etc)
I see you've already signed the Contributor License Agreement. Thanks.
This indeed could be a great addition to the hooks. However hook structure has been changed, and this version of the code goes agains the Rules of Hook
I would suggest work on the latest master and follow the Rules of Hook accordingly.
Thank you!