diff --git a/src/content/learn/keeping-components-pure.md b/src/content/learn/keeping-components-pure.md index 6a8fe10b8..739536665 100644 --- a/src/content/learn/keeping-components-pure.md +++ b/src/content/learn/keeping-components-pure.md @@ -77,7 +77,7 @@ export default function App() { `Recipe`’ye `drinkers={2}` pass ettiğinizde, `2 cups of water` içeren JSX döndürür. Her zaman. -`Drinkers` parametresine `{4}` değerini verip, `4 bardak su` içeren JSX’i döndürür. Her zaman. +`Recipe`’ye `drinkers={4}` pass ettiğinizde, `4 bardak su` içeren JSX return eder. Her zaman. Tıpkı bir math formula gibi. diff --git a/src/content/learn/passing-data-deeply-with-context.md b/src/content/learn/passing-data-deeply-with-context.md index 94f9b0ae8..5145f4536 100644 --- a/src/content/learn/passing-data-deeply-with-context.md +++ b/src/content/learn/passing-data-deeply-with-context.md @@ -962,7 +962,7 @@ function PlaceImage({ place, imageSize }) { ```js src/data.js export const places = [{ id: 0, - name: 'Cape Town, Güney Afrika\'da Bo-Kaap', + name: 'Güney Afrika, Cape Town’daki Bo-Kaap', description: 'Evler için parlak renkler seçme geleneği 20. yüzyılın sonlarında başlamıştır.', imageId: 'K9HVAGH' }, { @@ -991,8 +991,8 @@ export const places = [{ imageId: 'rTqKo46' }, { id: 6, - name: 'Busan, Güney Kore\'de Gamcheon Kültür Köyü', - description: '2009 yılında köy, evleri boyayanak, sergiler ve sanat gösterileri düzenlenerek bir kültür merkezi haline getirildi.', + name: 'Güney Kore, Busan’daki Gamcheon Kültür Köyü', + description: '2009 yılında köy, evler boyanarak, sergiler ve sanat gösterileri düzenlenerek bir kültür merkezi haline getirildi.', imageId: 'ZfQOOzf' }]; ``` @@ -1100,28 +1100,28 @@ export const ImageSizeContext = createContext(500); ```js src/data.js export const places = [{ id: 0, - name: 'Cape Town, Güney Afrika\'da Bo-Kaap', + name: 'Güney Afrika, Cape Town’daki Bo-Kaap', description: 'Evler için parlak renkler seçme geleneği 20. yüzyılın sonlarında başlamıştır.', imageId: 'K9HVAGH' }, { id: 1, - name: 'Rainbow Village in Taichung, Taiwan', - description: 'To save the houses from demolition, Huang Yung-Fu, a local resident, painted all 1,200 of them in 1924.', + name: 'Tayvan, Taichung’daki Rainbow Village', + 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ı.', imageId: '9EAYZrt' }, { id: 2, - name: 'Macromural de Pachuca, Mexico', - description: 'One of the largest murals in the world covering homes in a hillside neighborhood.', + name: 'Meksika, Pachuca’daki Macromural', + description: 'Bir yamaç mahallesindeki evleri kaplayan, dünyanın en büyük mural’larından biri.', imageId: 'DgXHVwu' }, { id: 3, - name: 'Selarón Staircase in Rio de Janeiro, Brazil', - description: 'This landmark was created by Jorge Selarón, a Chilean-born artist, as a "tribute to the Brazilian people".', + name: 'Brezilya, Rio de Janeiro’daki Selarón Merdivenleri', + description: 'Bu landmark, Şili doğumlu sanatçı Jorge Selarón tarafından "Brezilya halkına bir saygı duruşu" olarak oluşturuldu.', imageId: 'aeO3rpI' }, { id: 4, - name: 'Burano, Italy', - description: 'The houses are painted following a specific color system dating back to 16th century.', + name: 'Burano, İtalya', + description: 'Evler, geçmişi 16. yüzyıla dayanan belirli bir color system’e göre boyanmıştır.', imageId: 'kxsph5C' }, { id: 5, @@ -1130,8 +1130,8 @@ export const places = [{ imageId: 'rTqKo46' }, { id: 6, - name: 'Busan, Güney Kore\'de Gamcheon Kültür Köyü', - description: '2009 yılında köy, evleri boyayanak, sergiler ve sanat gösterileri düzenlenerek bir kültür merkezi haline getirildi.', + name: 'Güney Kore, Busan’daki Gamcheon Kültür Köyü', + description: '2009 yılında köy, evler boyanarak, sergiler ve sanat gösterileri düzenlenerek bir kültür merkezi haline getirildi.', imageId: 'ZfQOOzf' }]; ``` diff --git a/src/content/learn/react-compiler/installation.md b/src/content/learn/react-compiler/installation.md index 6cce34c6b..0ae0df17e 100644 --- a/src/content/learn/react-compiler/installation.md +++ b/src/content/learn/react-compiler/installation.md @@ -64,9 +64,32 @@ module.exports = { ### Vite {/*vite*/} -If you use Vite, you can add the plugin to vite-plugin-react: +If you use Vite with version 6.0.0 or later of `@vitejs/plugin-react`, you can use the `reactCompilerPreset`: -```js {3,9} + +npm install -D @rolldown/plugin-babel + + +```js {3-4,9-11} +// vite.config.js +import { defineConfig } from 'vite'; +import react, { reactCompilerPreset } from '@vitejs/plugin-react'; +import babel from '@rolldown/plugin-babel'; + +export default defineConfig({ + plugins: [ + react(), + babel({ + presets: [reactCompilerPreset()] + }), + ], +}); +``` + + +In `@vitejs/plugin-react@6.0.0`, the inline Babel option was removed. If you're using an older version, you can use: + +```js // vite.config.js import { defineConfig } from 'vite'; import react from '@vitejs/plugin-react'; @@ -81,26 +104,21 @@ export default defineConfig({ ], }); ``` + -Alternatively, if you prefer a separate Babel plugin for Vite: - - -npm install -D vite-plugin-babel - +Alternatively, you can use the Babel plugin directly with `@rolldown/plugin-babel`: -```js {2,11} +```js {3,9} // vite.config.js -import babel from 'vite-plugin-babel'; import { defineConfig } from 'vite'; import react from '@vitejs/plugin-react'; +import babel from '@rolldown/plugin-babel'; export default defineConfig({ plugins: [ react(), babel({ - babelConfig: { - plugins: ['babel-plugin-react-compiler'], - }, + plugins: ['babel-plugin-react-compiler'], }), ], }); diff --git a/src/content/learn/responding-to-events.md b/src/content/learn/responding-to-events.md index dd01df380..237cb7a22 100644 --- a/src/content/learn/responding-to-events.md +++ b/src/content/learn/responding-to-events.md @@ -414,7 +414,6 @@ Düğmelerden birisine tıkladığınızda: 1. React, `