docs(quickstarts): fix silent failures on the react, react-spa, and pages-router pages#399
Open
JoshKappler wants to merge 3 commits into
Open
docs(quickstarts): fix silent failures on the react, react-spa, and pages-router pages#399JoshKappler wants to merge 3 commits into
JoshKappler wants to merge 3 commits into
Conversation
The page's src/ paths do not exist in the app/ tree the scaffold creates, so a literal walk boots with GT silently absent. Use app/ paths, name the scaffold command, merge the two root.tsx steps into one compilable file, mount the built components in a route, and make html lang follow the resolved locale. Node floor comes from react-router's engines field.
The quickstart builds Welcome.tsx but nothing imports it, so the promised result never renders. Add the App.tsx wiring, restore the index.css import the main.tsx block dropped, name a scaffold command, and raise the stale Node 18 prerequisite to the ranges Vite 8 supports.
…html lang Steps 7 and 8 replace pages/index.tsx without the wrapped getServerSideProps from step 5, and the contact.tsx sample contradicts the page FAQ, so strings silently stay untranslated. Show complete files, add the missing wrapper, restore the globals.css import in _app.tsx, name the --no-app scaffold flag, and add a FAQ entry that wires html lang through _document.tsx.
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
src/butcreate-react-routerscaffoldsapp/, so a literal walk boots with GT silently absent, and two steps titled the same file so the second erased the first. Paths now match the scaffold, the root file compiles, the built components get mounted in a route, and<html lang>follows the resolved locale.Welcomecomponent the guide builds was never imported, so the promised result never rendered. Added theApp.tsxwiring and restored the scaffold'sindex.cssimport.pages/index.tsxwithout the wrappedgetServerSidePropsfrom step 5, andcontact.tsxcontradicted the page's own FAQ, so strings silently stayed untranslated. Samples now show complete files, and a new FAQ entry wires<html lang>through_document.tsx.--no-appfor the Pages Router, since barecreate-next-appscaffolds the App Router) and state the Node floor the current scaffolds declare.Testing
<html lang>follows the cookie andAccept-Language, including garbage-cookie and 404 paths.Notes
reactStrictModeno longer reproduces (the current scaffold ships an empty config), so it is deliberately left alone.lang; the_documentfix covers server-rendered pages (said in the FAQ entry).