-
Notifications
You must be signed in to change notification settings - Fork 528
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
fix(insights): ensure the same token is used when rendered multiple times server side #6456
Conversation
…es server side in insights middleware: ensure we read from the _initialResults (as insights starts before index is init'ed in getInitialResults: add the parameters to every index explicitly (it's not ui state so was missing otherwise) other changes in this PR: - something in the dependencies to prevent babel/babel#16689 - use a cache in the server side react examples - type `userToken` in SearchParameters
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit 59c9e64:
|
So does this mean the cache always needs to be manually cleared by the user on the server side? Maybe comment the reason for it in the examples? Or if you feel this would be very common, perhaps move it to instantsearch and have an optional opt out via a flag? |
The client cache in the examples is a bit of a stop-gap solution, I'm exploring some options for a follow-up:
With this temporary solution at least we have something to point users towards to avoid the secondary request with dynamic widgets. |
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.
Ah makes sense. lgtm.
other changes in this PR:
userToken
in SearchParametersrelated to CR-6992