Skip to content

Commit 641430f

Browse files
merging all conflicts
2 parents 6852848 + 2534424 commit 641430f

28 files changed

+80
-46
lines changed

.github/ISSUE_TEMPLATE/3-framework.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@ body:
88
value: |
99
## Apply to be included as a recommended React framework
1010
11-
_This form is for framework authors to apply to be included as a recommended [React framework](https://react.dev/learn/start-a-new-react-project). If you are not a framework author, please contact the authors before submitting._
11+
_This form is for framework authors to apply to be included as a recommended [React framework](https://react.dev/learn/creating-a-react-app). If you are not a framework author, please contact the authors before submitting._
1212
1313
Our goal when recommending a framework is to start developers with a React project that solves common problems like code splitting, data fetching, routing, and HTML generation without any extra work later. We believe this will allow users to get started quickly with React, and scale their app to production.
1414
15-
While we understand that many frameworks may want to be featured, this page is not a place to advertise every possible React framework or all frameworks that you can add React to. There are many great frameworks that offer support for React that are not listed in our guides. The frameworks we recommend have invested significantly in the React ecosystem, and collaborated with the React team to be compatible with our [full-stack React architecture vision](https://react.dev/learn/start-a-new-react-project#which-features-make-up-the-react-teams-full-stack-architecture-vision).
15+
While we understand that many frameworks may want to be featured, this page is not a place to advertise every possible React framework or all frameworks that you can add React to. There are many great frameworks that offer support for React that are not listed in our guides. The frameworks we recommend have invested significantly in the React ecosystem, and collaborated with the React team to be compatible with our [full-stack React architecture vision](https://react.dev/learn/creating-a-react-app#which-features-make-up-the-react-teams-full-stack-architecture-vision).
1616
1717
To be included, frameworks must meet the following criteria:
1818

plugins/remark-smartypants.js

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,24 @@ const visit = require('unist-util-visit');
1414
const retext = require('retext');
1515
const smartypants = require('retext-smartypants');
1616

17-
function check(parent) {
17+
function check(node, parent) {
18+
if (node.data?.skipSmartyPants) return false;
1819
if (parent.tagName === 'script') return false;
1920
if (parent.tagName === 'style') return false;
2021
return true;
2122
}
2223

24+
function markSkip(node) {
25+
if (!node) return;
26+
node.data ??= {};
27+
node.data.skipSmartyPants = true;
28+
if (Array.isArray(node.children)) {
29+
for (const child of node.children) {
30+
markSkip(child);
31+
}
32+
}
33+
}
34+
2335
module.exports = function (options) {
2436
const processor = retext().use(smartypants, {
2537
...options,
@@ -43,8 +55,14 @@ module.exports = function (options) {
4355
let startIndex = 0;
4456
const textOrInlineCodeNodes = [];
4557

58+
visit(tree, 'mdxJsxFlowElement', (node) => {
59+
if (['TerminalBlock'].includes(node.name)) {
60+
markSkip(node); // Mark all children to skip smarty pants
61+
}
62+
});
63+
4664
visit(tree, ['text', 'inlineCode'], (node, _, parent) => {
47-
if (check(parent)) {
65+
if (check(node, parent)) {
4866
if (node.type === 'text') allText += node.value;
4967
// for the case when inlineCode contains just one part of quote: `foo'bar`
5068
else allText += 'A'.repeat(node.value.length);

src/components/Layout/HomeContent.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,7 @@ export function HomeContent() {
270270
<CTA
271271
color="gray"
272272
icon="framework"
273-
href="/learn/start-a-new-react-project">
273+
href="/learn/creating-a-react-app">
274274
Get started with a framework
275275
</CTA>
276276
</div>

src/components/MDX/TerminalBlock.tsx

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -79,13 +79,15 @@ function TerminalBlock({level = 'info', children}: TerminalBlockProps) {
7979
</div>
8080
</div>
8181
</div>
82-
<div
82+
<pre
8383
className="px-8 pt-4 pb-6 text-primary-dark dark:text-primary-dark font-mono text-code whitespace-pre overflow-x-auto"
8484
translate="no"
8585
dir="ltr">
86-
<LevelText type={level} />
87-
{message}
88-
</div>
86+
<code>
87+
<LevelText type={level} />
88+
{message}
89+
</code>
90+
</pre>
8991
</div>
9092
);
9193
}

src/content/blog/2023/03/22/react-labs-what-we-have-been-working-on-march-2023.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ The biggest change is that we introduced [`async` / `await`](https://github.com/
3131

3232
Now that we have data fetching pretty well sorted, we're exploring the other direction: sending data from the client to the server, so that you can execute database mutations and implement forms. We're doing this by letting you pass Server Action functions across the server/client boundary, which the client can then call, providing seamless RPC. Server Actions also give you progressively enhanced forms before JavaScript loads.
3333

34-
React Server Components has shipped in [Next.js App Router](/learn/start-a-new-react-project#nextjs-app-router). This showcases a deep integration of a router that really buys into RSC as a primitive, but it's not the only way to build a RSC-compatible router and framework. There's a clear separation for features provided by the RSC spec and implementation. React Server Components is meant as a spec for components that work across compatible React frameworks.
34+
React Server Components has shipped in [Next.js App Router](/learn/creating-a-react-app#nextjs-app-router). This showcases a deep integration of a router that really buys into RSC as a primitive, but it's not the only way to build a RSC-compatible router and framework. There's a clear separation for features provided by the RSC spec and implementation. React Server Components is meant as a spec for components that work across compatible React frameworks.
3535

3636
We generally recommend using an existing framework, but if you need to build your own custom framework, it is possible. Building your own RSC-compatible framework is not as easy as we'd like it to be, mainly due to the deep bundler integration needed. The current generation of bundlers are great for use on the client, but they weren't designed with first-class support for splitting a single module graph between the server and the client. This is why we're now partnering directly with bundler developers to get the primitives for RSC built-in.
3737

@@ -92,7 +92,7 @@ Since our last update, we've tested an experimental version of prerendering inte
9292

9393
## Transition Tracing {/*transition-tracing*/}
9494

95-
The Transition Tracing API lets you detect when [React Transitions](/reference/react/useTransition) become slower and investigate why they may be slow. Following our last update, we have completed the initial design of the API and published an [RFC](https://github.com/reactjs/rfcs/pull/238). The basic capabilities have also been implemented. The project is currently on hold. We welcome feedback on the RFC and look forward to resuming its development to provide a better performance measurement tool for React. This will be particularly useful with routers built on top of React Transitions, like the [Next.js App Router](/learn/start-a-new-react-project#nextjs-app-router).
95+
The Transition Tracing API lets you detect when [React Transitions](/reference/react/useTransition) become slower and investigate why they may be slow. Following our last update, we have completed the initial design of the API and published an [RFC](https://github.com/reactjs/rfcs/pull/238). The basic capabilities have also been implemented. The project is currently on hold. We welcome feedback on the RFC and look forward to resuming its development to provide a better performance measurement tool for React. This will be particularly useful with routers built on top of React Transitions, like the [Next.js App Router](/learn/creating-a-react-app#nextjs-app-router).
9696

9797
* * *
9898
In addition to this update, our team has made recent guest appearances on community podcasts and livestreams to speak more on our work and answer questions.

src/content/blog/2024/12/05/react-19.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -355,7 +355,7 @@ For more information, see [React DOM Static APIs](/reference/react-dom/static).
355355

356356
Server Components are a new option that allows rendering components ahead of time, before bundling, in an environment separate from your client application or SSR server. This separate environment is the "server" in React Server Components. Server Components can run once at build time on your CI server, or they can be run for each request using a web server.
357357

358-
React 19 includes all of the React Server Components features included from the Canary channel. This means libraries that ship with Server Components can now target React 19 as a peer dependency with a `react-server` [export condition](https://github.com/reactjs/rfcs/blob/main/text/0227-server-module-conventions.md#react-server-conditional-exports) for use in frameworks that support the [Full-stack React Architecture](/learn/start-a-new-react-project#which-features-make-up-the-react-teams-full-stack-architecture-vision).
358+
React 19 includes all of the React Server Components features included from the Canary channel. This means libraries that ship with Server Components can now target React 19 as a peer dependency with a `react-server` [export condition](https://github.com/reactjs/rfcs/blob/main/text/0227-server-module-conventions.md#react-server-conditional-exports) for use in frameworks that support the [Full-stack React Architecture](/learn/creating-a-react-app#which-features-make-up-the-react-teams-full-stack-architecture-vision).
359359

360360

361361
<Note>

src/content/blog/2025/10/07/react-compiler-1.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -69,17 +69,17 @@ To install the compiler:
6969

7070
npm
7171
<TerminalBlock>
72-
{`npm install --save-dev --save-exact babel-plugin-react-compiler@latest`}
72+
npm install --save-dev --save-exact babel-plugin-react-compiler@latest
7373
</TerminalBlock>
7474

7575
pnpm
7676
<TerminalBlock>
77-
{`pnpm add --save-dev --save-exact babel-plugin-react-compiler@latest`}
77+
pnpm add --save-dev --save-exact babel-plugin-react-compiler@latest
7878
</TerminalBlock>
7979

8080
yarn
8181
<TerminalBlock>
82-
{`yarn add --dev --exact babel-plugin-react-compiler@latest`}
82+
yarn add --dev --exact babel-plugin-react-compiler@latest
8383
</TerminalBlock>
8484

8585
As part of the stable release, we've been making React Compiler easier to add to your projects and added optimizations to how the compiler generates memoization. React Compiler now supports optional chains and array indices as dependencies. These improvements ultimately result in fewer re-renders and more responsive UIs, while letting you keep writing idiomatic declarative code.
@@ -101,17 +101,17 @@ To install:
101101

102102
npm
103103
<TerminalBlock>
104-
{`npm install --save-dev eslint-plugin-react-hooks@latest`}
104+
npm install --save-dev eslint-plugin-react-hooks@latest
105105
</TerminalBlock>
106106

107107
pnpm
108108
<TerminalBlock>
109-
{`pnpm add --save-dev eslint-plugin-react-hooks@latest`}
109+
pnpm add --save-dev eslint-plugin-react-hooks@latest
110110
</TerminalBlock>
111111

112112
yarn
113113
<TerminalBlock>
114-
{`yarn add --dev eslint-plugin-react-hooks@latest`}
114+
yarn add --dev eslint-plugin-react-hooks@latest
115115
</TerminalBlock>
116116

117117
```js {6}
@@ -153,19 +153,19 @@ We have partnered with the Expo, Vite, and Next.js teams to add the compiler to
153153
[Expo SDK 54](https://docs.expo.dev/guides/react-compiler/) and up has the compiler enabled by default, so new apps will automatically be able to take advantage of the compiler from the start.
154154

155155
<TerminalBlock>
156-
{`npx create-expo-app@latest`}
156+
npx create-expo-app@latest
157157
</TerminalBlock>
158158

159159
[Vite](https://vite.dev/guide/) and [Next.js](https://nextjs.org/docs/app/api-reference/cli/create-next-app) users can choose the compiler enabled templates in `create-vite` and `create-next-app`.
160160

161161
<TerminalBlock>
162-
{`npm create vite@latest`}
162+
npm create vite@latest
163163
</TerminalBlock>
164164

165165
<br />
166166

167167
<TerminalBlock>
168-
{`npx create-next-app@latest`}
168+
npx create-next-app@latest
169169
</TerminalBlock>
170170

171171
## Adopt React Compiler incrementally {/*adopt-react-compiler-incrementally*/}

src/content/learn/add-react-to-an-existing-project.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,15 @@ Recimo da imate postojeći veb sajt na `example.com` napravljen sa nekom drugom
2020

2121
Evo kako preporučujemo da to uradite:
2222

23+
<<<<<<< HEAD
2324
1. **Napravite React deo vaše aplikacije** koristeći jedan od [React-based framework-a](/learn/start-a-new-react-project).
2425
2. **Specifikujte `/some-app` kao *base path*** u konfiguraciji vašeg framework-a (evo kako: [Next.js](https://nextjs.org/docs/app/api-reference/config/next-config-js/basePath), [Gatsby](https://www.gatsbyjs.com/docs/how-to/previews-deploys-hosting/path-prefix/)).
2526
3. **Konfigurišite vaš server ili proxy** tako da sve rute ispod `/some-app/` budu obrađene od strane vaše React aplikacije.
27+
=======
28+
1. **Build the React part of your app** using one of the [React-based frameworks](/learn/creating-a-react-app).
29+
2. **Specify `/some-app` as the *base path*** in your framework's configuration (here's how: [Next.js](https://nextjs.org/docs/app/api-reference/config/next-config-js/basePath), [Gatsby](https://www.gatsbyjs.com/docs/how-to/previews-deploys-hosting/path-prefix/)).
30+
3. **Configure your server or a proxy** so that all requests under `/some-app/` are handled by your React app.
31+
>>>>>>> 2534424ec6c433cc2c811d5a0bd5a65b75efa5f0
2632
2733
Ovo će omogućiti React delu vaše aplikacije da [koristi najbolje prakse](/learn/build-a-react-app-from-scratch#consider-using-a-framework) koje su ugrađene u te framework-e.
2834

@@ -151,7 +157,11 @@ root.render(<NavigationBar />);
151157

152158
Primećujemo kako je originalni HTML sadržaj iz `index.html` sačuvan, ali vaša `NavigationBar` React komponenta sada se pojavljuje unutar `<nav id="navigation">` iz vašeg HTML-a. Pročitajte [createRoot dokumentaciju](/reference/react-dom/client/createRoot#rendering-a-page-partially-built-with-react) da biste saznali više o renderovanju React komponenti unutar postojeće HTML stranice.
153159

160+
<<<<<<< HEAD
154161
Kada usvojite React u postojeći projekat, uobičajeno je da počnete sa malim interaktivnim komponentama (kao što su dugmad), i onda postepeno "idete na viši nivo" dok na kraju vaša cela stranica nije napravljena sa React-om. Ako ikada dođete do tog nivoa, preporučujemo da odmah nakon toga pređete na [React framework](/learn/start-a-new-react-project) da biste dobili najviše od React-a.
162+
=======
163+
When you adopt React in an existing project, it's common to start with small interactive components (like buttons), and then gradually keep "moving upwards" until eventually your entire page is built with React. If you ever reach that point, we recommend migrating to [a React framework](/learn/creating-a-react-app) right after to get the most out of React.
164+
>>>>>>> 2534424ec6c433cc2c811d5a0bd5a65b75efa5f0
155165
156166
## Koristite React Native u postojećoj mobilnoj aplikaciji {/*using-react-native-in-an-existing-mobile-app*/}
157167

src/content/learn/build-a-react-app-from-scratch.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ The first step is to install a build tool like `vite`, `parcel`, or `rsbuild`. T
3434
[Vite](https://vite.dev/) is a build tool that aims to provide a faster and leaner development experience for modern web projects.
3535

3636
<TerminalBlock>
37-
{`npm create vite@latest my-app -- --template react-ts`}
37+
npm create vite@latest my-app -- --template react-ts
3838
</TerminalBlock>
3939

4040
Vite is opinionated and comes with sensible defaults out of the box. Vite has a rich ecosystem of plugins to support fast refresh, JSX, Babel/SWC, and other common features. See Vite's [React plugin](https://vite.dev/plugins/#vitejs-plugin-react) or [React SWC plugin](https://vite.dev/plugins/#vitejs-plugin-react-swc) and [React SSR example project](https://vite.dev/guide/ssr.html#example-projects) to get started.
@@ -46,7 +46,7 @@ Vite is already being used as a build tool in one of our [recommended frameworks
4646
[Parcel](https://parceljs.org/) combines a great out-of-the-box development experience with a scalable architecture that can take your project from just getting started to massive production applications.
4747

4848
<TerminalBlock>
49-
{`npm install --save-dev parcel`}
49+
npm install --save-dev parcel
5050
</TerminalBlock>
5151

5252
Parcel supports fast refresh, JSX, TypeScript, Flow, and styling out of the box. See [Parcel's React recipe](https://parceljs.org/recipes/react/#getting-started) to get started.
@@ -56,7 +56,7 @@ Parcel supports fast refresh, JSX, TypeScript, Flow, and styling out of the box.
5656
[Rsbuild](https://rsbuild.dev/) is an Rspack-powered build tool that provides a seamless development experience for React applications. It comes with carefully tuned defaults and performance optimizations ready to use.
5757

5858
<TerminalBlock>
59-
{`npx create-rsbuild --template react`}
59+
npx create-rsbuild --template react
6060
</TerminalBlock>
6161

6262
Rsbuild includes built-in support for React features like fast refresh, JSX, TypeScript, and styling. See [Rsbuild's React guide](https://rsbuild.dev/guide/framework/react) to get started.

src/content/learn/react-compiler/installation.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ Please refer to the [Next.js docs](https://nextjs.org/docs/app/api-reference/nex
114114
Install `vite-plugin-babel`, and add the compiler's Babel plugin to it:
115115

116116
<TerminalBlock>
117-
{`npm install vite-plugin-babel`}
117+
npm install vite-plugin-babel
118118
</TerminalBlock>
119119

120120
```js {3-4,16}

0 commit comments

Comments
 (0)