Skip to content

Commit d7efe07

Browse files
authored
Merge pull request #711 from reactjs/sync-47e64bf7
Sync with react.dev @ 47e64bf
2 parents 6fde06c + 81525c4 commit d7efe07

6 files changed

Lines changed: 196 additions & 179 deletions

File tree

src/content/learn/keeping-components-pure.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ export default function App() {
7777

7878
`Recipe`’ye `drinkers={2}` pass ettiğinizde, `2 cups of water` içeren JSX döndürür. Her zaman.
7979

80-
`Drinkers` parametresine `{4}` değerini verip, `4 bardak su` içeren JSX’i döndürür. Her zaman.
80+
`Recipe`’ye `drinkers={4}` pass ettiğinizde, `4 bardak su` içeren JSX return eder. Her zaman.
8181

8282
Tıpkı bir math formula gibi.
8383

src/content/learn/passing-data-deeply-with-context.md

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -962,7 +962,7 @@ function PlaceImage({ place, imageSize }) {
962962
```js src/data.js
963963
export const places = [{
964964
id: 0,
965-
name: 'Cape Town, Güney Afrika\'da Bo-Kaap',
965+
name: 'Güney Afrika, Cape Town’daki Bo-Kaap',
966966
description: 'Evler için parlak renkler seçme geleneği 20. yüzyılın sonlarında başlamıştır.',
967967
imageId: 'K9HVAGH'
968968
}, {
@@ -991,8 +991,8 @@ export const places = [{
991991
imageId: 'rTqKo46'
992992
}, {
993993
id: 6,
994-
name: 'Busan, Güney Kore\'de Gamcheon Kültür Köyü',
995-
description: '2009 yılında köy, evleri boyayanak, sergiler ve sanat gösterileri düzenlenerek bir kültür merkezi haline getirildi.',
994+
name: 'Güney Kore, Busan’daki Gamcheon Kültür Köyü',
995+
description: '2009 yılında köy, evler boyanarak, sergiler ve sanat gösterileri düzenlenerek bir kültür merkezi haline getirildi.',
996996
imageId: 'ZfQOOzf'
997997
}];
998998
```
@@ -1100,28 +1100,28 @@ export const ImageSizeContext = createContext(500);
11001100
```js src/data.js
11011101
export const places = [{
11021102
id: 0,
1103-
name: 'Cape Town, Güney Afrika\'da Bo-Kaap',
1103+
name: 'Güney Afrika, Cape Town’daki Bo-Kaap',
11041104
description: 'Evler için parlak renkler seçme geleneği 20. yüzyılın sonlarında başlamıştır.',
11051105
imageId: 'K9HVAGH'
11061106
}, {
11071107
id: 1,
1108-
name: 'Rainbow Village in Taichung, Taiwan',
1109-
description: 'To save the houses from demolition, Huang Yung-Fu, a local resident, painted all 1,200 of them in 1924.',
1108+
name: 'Tayvan, Taichung’daki Rainbow Village',
1109+
description: 'Evleri yıkımdan kurtarmak için yerel bir sakin olan Huang Yung-Fu, 1924 yılında bu 1.200 evin tamamını boyadı.',
11101110
imageId: '9EAYZrt'
11111111
}, {
11121112
id: 2,
1113-
name: 'Macromural de Pachuca, Mexico',
1114-
description: 'One of the largest murals in the world covering homes in a hillside neighborhood.',
1113+
name: 'Meksika, Pachuca’daki Macromural',
1114+
description: 'Bir yamaç mahallesindeki evleri kaplayan, dünyanın en büyük mural’larından biri.',
11151115
imageId: 'DgXHVwu'
11161116
}, {
11171117
id: 3,
1118-
name: 'Selarón Staircase in Rio de Janeiro, Brazil',
1119-
description: 'This landmark was created by Jorge Selarón, a Chilean-born artist, as a "tribute to the Brazilian people".',
1118+
name: 'Brezilya, Rio de Janeiro’daki Selarón Merdivenleri',
1119+
description: 'Bu landmark, Şili doğumlu sanatçı Jorge Selarón tarafından "Brezilya halkına bir saygı duruşu" olarak oluşturuldu.',
11201120
imageId: 'aeO3rpI'
11211121
}, {
11221122
id: 4,
1123-
name: 'Burano, Italy',
1124-
description: 'The houses are painted following a specific color system dating back to 16th century.',
1123+
name: 'Burano, İtalya',
1124+
description: 'Evler, geçmişi 16. yüzyıla dayanan belirli bir color system’e göre boyanmıştır.',
11251125
imageId: 'kxsph5C'
11261126
}, {
11271127
id: 5,
@@ -1130,8 +1130,8 @@ export const places = [{
11301130
imageId: 'rTqKo46'
11311131
}, {
11321132
id: 6,
1133-
name: 'Busan, Güney Kore\'de Gamcheon Kültür Köyü',
1134-
description: '2009 yılında köy, evleri boyayanak, sergiler ve sanat gösterileri düzenlenerek bir kültür merkezi haline getirildi.',
1133+
name: 'Güney Kore, Busan’daki Gamcheon Kültür Köyü',
1134+
description: '2009 yılında köy, evler boyanarak, sergiler ve sanat gösterileri düzenlenerek bir kültür merkezi haline getirildi.',
11351135
imageId: 'ZfQOOzf'
11361136
}];
11371137
```

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

Lines changed: 30 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -64,9 +64,32 @@ module.exports = {
6464

6565
### Vite {/*vite*/}
6666

67-
If you use Vite, you can add the plugin to vite-plugin-react:
67+
If you use Vite with version 6.0.0 or later of `@vitejs/plugin-react`, you can use the `reactCompilerPreset`:
6868

69-
```js {3,9}
69+
<TerminalBlock>
70+
npm install -D @rolldown/plugin-babel
71+
</TerminalBlock>
72+
73+
```js {3-4,9-11}
74+
// vite.config.js
75+
import { defineConfig } from 'vite';
76+
import react, { reactCompilerPreset } from '@vitejs/plugin-react';
77+
import babel from '@rolldown/plugin-babel';
78+
79+
export default defineConfig({
80+
plugins: [
81+
react(),
82+
babel({
83+
presets: [reactCompilerPreset()]
84+
}),
85+
],
86+
});
87+
```
88+
89+
<Note>
90+
In `@vitejs/plugin-react@6.0.0`, the inline Babel option was removed. If you're using an older version, you can use:
91+
92+
```js
7093
// vite.config.js
7194
import { defineConfig } from 'vite';
7295
import react from '@vitejs/plugin-react';
@@ -81,26 +104,21 @@ export default defineConfig({
81104
],
82105
});
83106
```
107+
</Note>
84108

85-
Alternatively, if you prefer a separate Babel plugin for Vite:
86-
87-
<TerminalBlock>
88-
npm install -D vite-plugin-babel
89-
</TerminalBlock>
109+
Alternatively, you can use the Babel plugin directly with `@rolldown/plugin-babel`:
90110

91-
```js {2,11}
111+
```js {3,9}
92112
// vite.config.js
93-
import babel from 'vite-plugin-babel';
94113
import { defineConfig } from 'vite';
95114
import react from '@vitejs/plugin-react';
115+
import babel from '@rolldown/plugin-babel';
96116

97117
export default defineConfig({
98118
plugins: [
99119
react(),
100120
babel({
101-
babelConfig: {
102-
plugins: ['babel-plugin-react-compiler'],
103-
},
121+
plugins: ['babel-plugin-react-compiler'],
104122
}),
105123
],
106124
});

src/content/learn/responding-to-events.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -414,7 +414,6 @@ Düğmelerden birisine tıkladığınızda:
414414

415415
1. React, `<button>`’a pass edilen `onClick` handler’ını çağırır.
416416
2. `Button` içinde tanımlanan bu handler şunları yapar:
417-
418417
* `e.stopPropagation()` çağırır ve event’in daha fazla bubble etmesini engeller.
419418
* `Toolbar` component’inden prop olarak pass edilen `onClick` function’ını çağırır.
420419
3. `Toolbar` component’i içinde tanımlanan bu function, button’ın kendi alert’ini gösterir.

0 commit comments

Comments
 (0)