-
Notifications
You must be signed in to change notification settings - Fork 3
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
Rework the SearchHeadlessProvider
to be a pass-through.
#156
Merged
Conversation
This file contains 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
Per Product's request, the `SearchHeadlessProvider` is now a mere pass-through to the `SearchHeadlessContext.Provider`. Users will need to create and initialize a `Headless` instance themselves. The `acquireSessionId` utility will be moved to either the Component Library or Headless, TBD. The Jest test that was added ensures the `Provider` does not touch anything in the `Headless` instance. TEST=auto Ran all unit tests.
oshi97
reviewed
Sep 1, 2022
nmanu1
reviewed
Sep 1, 2022
…s-headless-react into dev/rework-headless-provider
oshi97
approved these changes
Sep 1, 2022
Merged
yen-tt
added a commit
that referenced
this pull request
Sep 8, 2022
## Version 2.0.0 ### Breaking Changes - Upgraded search-headless dependency to V2. This means re-exported interfaces related to static filters and direct answers stems from search-headless V1 have been changed or removed in headless-react V2. - for more details, see the breaking changes listed in V2 [release notes](https://github.com/yext/search-headless/releases/tag/v2.0.0) and [documentation](https://github.com/yext/search-headless/blob/main/docs/search-headless.md) of search-headless - `SearchHeadlessProvider` now takes in a `SearchHeadless` instance instead of a `SearchConfig` object. `SearchHeadlessProvider` will also no longer set vertical key, session tracking, and session id for the `SearchHeadless` instance. Users will need to create and initialize a Headless instance themselves. For more context, this change is made to prevent potential memory leaks, per Redux's recommendation that redux store (i.e. `SearchHeadless` instance) should not be instantiated within a render function. (#156) - All exports marked as `@deprecated` in previous publish as part of the rebranding process, as well as `subscribeToStateUpdates`, is now removed in V2 (#153 ) - for more details, the deprecated identifiers are listed in [v1.3 release notes](https://github.com/yext/search-headless-react/releases/tag/v1.3.0)
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.
Per Product's request, the
SearchHeadlessProvider
is now a mere pass-through to theSearchHeadlessContext.Provider
. Users will need to create and initialize aHeadless
instance themselves. This PR also removed theClient-SDK
header for Headless React. Product and I determined that it was not useful to track the Headless React version.The
acquireSessionId
utility will be moved to either the Component Library or Headless, TBD. The Jest test that was added ensures theProvider
does not touch anything in theHeadless
instance.TEST=auto
Ran all unit tests.