diff --git a/src/content/community/conferences.md b/src/content/community/conferences.md index 7adbb4035..3dd5eba45 100644 --- a/src/content/community/conferences.md +++ b/src/content/community/conferences.md @@ -25,6 +25,11 @@ September 10-11, 2026. In-person in Zurich, Switzerland [Website](https://conf.zurichjs.com?utm_campaign=ZurichJS_Conf&utm_source=referral&utm_content=reactjs_community_conferences) - [Twitter](https://x.com/zurichjs) - [LinkedIn](https://www.linkedin.com/company/zurichjs/) +### React Conf Japan 2027 {/*react-conf-japan-2027*/} +April 24, 2027. In-person in Tokyo, Japan + +[Website](https://reactconf.jp/) - [Twitter](https://x.com/reactconfjp) + ## Past Conferences {/*past-conferences*/} ### CityJS New Delhi 2026 {/*cityjs-newdelhi-2026*/} diff --git a/src/content/learn/react-compiler/installation.md b/src/content/learn/react-compiler/installation.md index c99240fae..00d1a109e 100644 --- a/src/content/learn/react-compiler/installation.md +++ b/src/content/learn/react-compiler/installation.md @@ -64,9 +64,36 @@ module.exports = { ### Vite {/*vite*/} +<<<<<<< HEAD Vite を使用している場合は、プラグインを vite-plugin-react に追加できます。 +======= +If you use Vite with version 6.0.0 or later of `@vitejs/plugin-react`, you can use the `reactCompilerPreset`: +>>>>>>> 6ec61348646040795fdaa9de14a9bec603260f87 -```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 +108,25 @@ export default defineConfig({ ], }); ``` + +<<<<<<< HEAD または、Vite 用の Babel プラグインを別に使用したい場合は以下のようにします。 +======= +Alternatively, you can use the Babel plugin directly with `@rolldown/plugin-babel`: +>>>>>>> 6ec61348646040795fdaa9de14a9bec603260f87 - -npm install -D vite-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/reference/react/useOptimistic.md b/src/content/reference/react/useOptimistic.md index abc914e86..27507cc5f 100644 --- a/src/content/reference/react/useOptimistic.md +++ b/src/content/reference/react/useOptimistic.md @@ -83,7 +83,11 @@ function handleClick() { #### 楽観的 state の仕組み {/*how-optimistic-state-works*/} +<<<<<<< HEAD `useOptimistic` を使うと、アクションの実行中に一時的な値を表示できます。 +======= +`useOptimistic` lets you show a temporary value while an Action is in progress: +>>>>>>> 6ec61348646040795fdaa9de14a9bec603260f87 ```js const [value, setValue] = useState('a');