You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/content/learn/build-a-react-app-from-scratch.md
+4-4
Original file line number
Diff line number
Diff line change
@@ -69,13 +69,13 @@ If you'd you're starting from scratch with React Native you'll need to use [Metr
69
69
70
70
</Note>
71
71
72
-
###Step 2: Build Common Application Patterns {/*step-2-build-common-application-patterns*/}
72
+
## Step 2: Build Common Application Patterns {/*step-2-build-common-application-patterns*/}
73
73
74
74
The build tools listed above start off with a client-only, single-page app (SPA), but don't include any further solutions for common functionality like routing, data fetching, or styling.
75
75
76
76
The React ecosystem includes many tools for these problems. We've listed a few that are widely used as a starting point, but feel free to choose other tools if those work better for you.
77
77
78
-
####Routing {/*routing*/}
78
+
### Routing {/*routing*/}
79
79
80
80
Routing determines what content or pages to display when a user visits a particular URL. You need to set up a router to map URLs to different parts of your app. You'll also need to handle nested routes, route parameters, and query parameters. Routers can be configured within your code, or defined based on your component folder and file structures.
Fetching data from a server or other data source is a key part of most applications. Doing this properly requires handling loading states, error states, and caching the fetched data, which can be complex.
93
93
@@ -128,7 +128,7 @@ Since the build tool you select only support single page apps (SPAs) you'll need
128
128
129
129
***Streaming Server-side rendering (SSR)** renders a page on the server and sends the fully rendered page to the client. SSR can improve performance, but it can be more complex to set up and maintain than a single-page app. With the addition of streaming, SSR can be very complex to set up and maintain. See [Vite's SSR guide](https://vite.dev/guide/ssr).
130
130
131
-
***Static site generation (SSG)** generates static HTML files for your app at build time. SSG can improve performance, but it can be more complex to set up and maintain than server-side rendering.
131
+
***Static site generation (SSG)** generates static HTML files for your app at build time. SSG can improve performance, but it can be more complex to set up and maintain than server-side rendering. See [Vite's SSG guide](https://vite.dev/guide/ssr.html#pre-rendering-ssg).
132
132
133
133
***React Server Components (RSC)** lets you mix build-time, server-only, and interactive components in a single React tree. RSC can improve performance, but it currently requires deep expertise to set up and maintain. See [Parcel's RSC examples](https://github.com/parcel-bundler/rsc-examples).
0 commit comments