docs(react): add server-rendered and SPA quickstarts#349
Merged
Conversation
- Add tutorials/quickstart-spa: Vite-first setup with initializeGTSPA(), a bootstrap entry module awaited before render, and no provider - Add tutorials/quickstart-ssr: initializeGT() at module scope, per-request getTranslationsSnapshot(locale) passed to <GTProvider>, with a concrete cookie -> Accept-Language -> default locale resolver using determineLocale - Turn react/index into a chooser between the two quickstarts
ErnestM1234
commented
Jul 9, 2026
ErnestM1234
commented
Jul 9, 2026
ErnestM1234
commented
Jul 9, 2026
ErnestM1234
commented
Jul 9, 2026
ErnestM1234
commented
Jul 9, 2026
ErnestM1234
commented
Jul 9, 2026
ErnestM1234
commented
Jul 9, 2026
ErnestM1234
commented
Jul 9, 2026
ErnestM1234
commented
Jul 10, 2026
ErnestM1234
commented
Jul 10, 2026
ErnestM1234
commented
Jul 10, 2026
ErnestM1234
commented
Jul 10, 2026
ErnestM1234
commented
Jul 10, 2026
ErnestM1234
commented
Jul 10, 2026
ErnestM1234
enabled auto-merge (squash)
July 13, 2026 23:26
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.
Summary
Makes the server-rendered setup the primary
gt-reactquickstart at/docs/react, since that is the expected path for most React applications:react/index— initializes server-rendered apps withinitializeGT(), resolves each request withparseLocale(request), loads a translation snapshot, and passes it to<GTProvider>. An info callout directs client-only apps to the SPA quickstart.react/tutorials/quickstart-spa— provides a focused client-only setup usinginitializeGTSPA(), module-levelt(), and no provider. Compiler and development-key setup are intentionally optional.react/tutorials/spa-development-translations— contains the optional compiler and development API-key setup for live translations while developing an SPA.Note on #340
These files overlap with the open Odysseus docs PR #340. If #340 merges first, this PR will need a small rebase; alternatively, the quickstart files can be dropped from #340.
Validation
pnpm --dir scripts validate-linkspnpm build:content