-
Notifications
You must be signed in to change notification settings - Fork 34
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(headless,headless-react): make ssr terminology more consistent #3159
Conversation
Dependency Review✅ No vulnerabilities or license issues found.Snapshot WarningsEnsure that dependencies are being submitted on PR branches and consider enabling retry-on-snapshot-warnings. See the documentation for more information and troubleshooting advice. Scanned Manifest Files |
Pull Request Report PR Title ✅ Title follows the conventional commit spec. Bundle Size
|
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.
I like this language much more, it's very natural 🙂
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.
LGTM, better 💯
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.
Reads better overall!
Just a couple of places that got missed.
packages/samples/headless-ssr/src/app/react/components/search-page.tsx
Outdated
Show resolved
Hide resolved
Woops, missed those because I was doing a search and replace for SSR/CSR State to Static/Hydrated state. Tried again, but this time used regular expressions like |
https://coveord.atlassian.net/browse/KIT-2680
Here's a chart of the server-side-rendering flow:
For StateA and StateB, we've been using inconsistent terminology.
In this PR, my goal is to align all the terms to be consistent. Here are the two main options we've been discussing:
"initial state""static state". For stateB, use "hydrated state"defineSearchEngine
, which returns anEngineDefinition<...>
fetchInitialState
fetchStaticState
InitialState<...>
StaticState<...>
hydrateInitialState
hydrateStaticState
InitialState<...>
StaticState<...>
as a parameter.HydratedState<...>
defineSearchEngine
, which returns anEngineDefinition<...>
fetchSSRState
SSRState<...>
hydrateSSRState
(?)SSRState<...>
as a parameter.CSRState<...>
I picked option 1, since it feels more natural to me after all.