Merged
Conversation
|
Size Change: +186 B (0%) Total Size: 1.19 MB
ℹ️ View Unchanged
|
jamesgorrie
approved these changes
Feb 8, 2022
Contributor
jamesgorrie
left a comment
There was a problem hiding this comment.
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 <jamesgorrie@users.noreply.github.com>
…ndering into oliver/withab
Contributor
Author
Essentially, yes. Once we start moving components that have AB tests into islands then they will either need to set their own |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this change?
This refactors how we set the
ABProviderby moving it into aWithABProviderwrapper componentWhy?
So that it will be easier to set more of these providers in future as we move over to islands