-
Notifications
You must be signed in to change notification settings - Fork 30
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
WithABProvider
#3945
WithABProvider
#3945
Conversation
Size Change: +186 B (0%) Total Size: 1.19 MB
ℹ️ View Unchanged
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The code looks good. Is the main reason to encapsulate the logic?
const cypressAbSwitches = getCypressSwitches();
const windowHash = window && window.location && window.location.hash;
Otherwise it does just appear to be wrapping a Provider in a FunctionComponent
?
Co-authored-by: James Gorrie <[email protected]>
Essentially, yes. Once we start moving components that have AB tests into islands then they will either need to set their own |
What does this change?
This refactors how we set the
ABProvider
by moving it into aWithABProvider
wrapper componentWhy?
So that it will be easier to set more of these providers in future as we move over to islands