Skip to content

Commit aab993f

Browse files
merging all conflicts
2 parents 7f38231 + 2639f36 commit aab993f

18 files changed

Lines changed: 2001 additions & 100 deletions
-38.5 KB
Binary file not shown.
76.5 KB
Loading
463 KB
Loading
-245 KB
Binary file not shown.
10.8 KB
Loading

src/components/ButtonLink.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ function ButtonLink({
3333
className,
3434
'active:scale-[.98] transition-transform inline-flex font-bold items-center outline-none focus:outline-none focus-visible:outline focus-visible:outline-link focus:outline-offset-2 focus-visible:dark:focus:outline-link-dark leading-snug',
3535
{
36-
'bg-link text-white dark:bg-brand-dark dark:text-secondary hover:bg-opacity-80':
36+
'bg-link text-white dark:bg-brand-dark dark:text-gray-90 hover:bg-opacity-80':
3737
type === 'primary',
3838
'text-primary dark:text-primary-dark shadow-secondary-button-stroke dark:shadow-secondary-button-stroke-dark hover:bg-gray-40/5 active:bg-gray-40/10 hover:dark:bg-gray-60/5 active:dark:bg-gray-60/10':
3939
type === 'secondary',

src/content/community/conferences.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,11 @@ September 10-11, 2026. In-person in Zurich, Switzerland
2525

2626
[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/)
2727

28+
### React Conf Japan 2027 {/*react-conf-japan-2027*/}
29+
April 24, 2027. In-person in Tokyo, Japan
30+
31+
[Website](https://reactconf.jp/) - [Twitter](https://x.com/reactconfjp)
32+
2833
## Past Conferences {/*past-conferences*/}
2934

3035
### CityJS New Delhi 2026 {/*cityjs-newdelhi-2026*/}

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

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

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

67+
<<<<<<< HEAD
6768
Vite を使用している場合は、プラグインを vite-plugin-react に追加できます。
69+
=======
70+
If you use Vite with version 6.0.0 or later of `@vitejs/plugin-react`, you can use the `reactCompilerPreset`:
71+
>>>>>>> 2639f369946f763fff9a2572b0d7c4b9e2f83ebd
6872
69-
```js {3,9}
73+
<TerminalBlock>
74+
npm install -D @rolldown/plugin-babel
75+
</TerminalBlock>
76+
77+
```js {3-4,9-11}
78+
// vite.config.js
79+
import { defineConfig } from 'vite';
80+
import react, { reactCompilerPreset } from '@vitejs/plugin-react';
81+
import babel from '@rolldown/plugin-babel';
82+
83+
export default defineConfig({
84+
plugins: [
85+
react(),
86+
babel({
87+
presets: [reactCompilerPreset()]
88+
}),
89+
],
90+
});
91+
```
92+
93+
<Note>
94+
In `@vitejs/plugin-react@6.0.0`, the inline Babel option was removed. If you're using an older version, you can use:
95+
96+
```js
7097
// vite.config.js
7198
import { defineConfig } from 'vite';
7299
import react from '@vitejs/plugin-react';
@@ -81,26 +108,25 @@ export default defineConfig({
81108
],
82109
});
83110
```
111+
</Note>
84112

113+
<<<<<<< HEAD
85114
または、Vite 用の Babel プラグインを別に使用したい場合は以下のようにします。
115+
=======
116+
Alternatively, you can use the Babel plugin directly with `@rolldown/plugin-babel`:
117+
>>>>>>> 2639f369946f763fff9a2572b0d7c4b9e2f83ebd
86118
87-
<TerminalBlock>
88-
npm install -D vite-plugin-babel
89-
</TerminalBlock>
90-
91-
```js {2,11}
119+
```js {3,9}
92120
// vite.config.js
93-
import babel from 'vite-plugin-babel';
94121
import { defineConfig } from 'vite';
95122
import react from '@vitejs/plugin-react';
123+
import babel from '@rolldown/plugin-babel';
96124

97125
export default defineConfig({
98126
plugins: [
99127
react(),
100128
babel({
101-
babelConfig: {
102-
plugins: ['babel-plugin-react-compiler'],
103-
},
129+
plugins: ['babel-plugin-react-compiler'],
104130
}),
105131
],
106132
});

src/content/learn/tutorial-tic-tac-toe.md

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -899,19 +899,34 @@ body {
899899
900900
### React Developer Tools {/*react-developer-tools*/}
901901
902+
<<<<<<< HEAD
902903
React DevTools を使うと、React コンポーネントの props や state を確認することができます。React DevTools タブは、CodeSandbox の *Browser* セクションの下部にあります。
903904
904905
![CodeSandbox 内の React DevTools](../images/tutorial/codesandbox-devtools.png)
905906
906907
画面上の特定のコンポーネントについて調べるには、React DevTools の左上にあるボタンを使用します。
907908
908909
![React DevTools でページ上のコンポーネントを選択する](../images/tutorial/devtools-select.gif)
910+
=======
911+
React Developer Tools let you check the props and the state of your React components. It is available as a [Chrome](https://chrome.google.com/webstore/detail/react-developer-tools/fmkadmapgofadopljbjfkapdkoienihi?hl=en), [Firefox](https://addons.mozilla.org/en-US/firefox/addon/react-devtools/), and [Edge](https://microsoftedge.microsoft.com/addons/detail/react-developer-tools/gpphkfbcpidddadnkolkpfckpihlkkil) browser extension.
909912
910-
<Note>
913+
After you install it, a new *Components* tab will appear in your browser Developer Tools for sites using React. If you're following along in CodeSandbox, you'd need to first open your sandbox preview in a new tab:
914+
915+
![opening in new tab](../images/tutorial/sandbox-new-tab.png)
916+
917+
Then, on the preview page, open your browser's DevTools and find the *Components* tab:
918+
>>>>>>> 2639f369946f763fff9a2572b0d7c4b9e2f83ebd
911919
920+
![components tab](../images/tutorial/components-tab.png)
921+
922+
<<<<<<< HEAD
912923
ローカル開発をしている場合、React DevTools は [Chrome](https://chrome.google.com/webstore/detail/react-developer-tools/fmkadmapgofadopljbjfkapdkoienihi?hl=en)、[Firefox](https://addons.mozilla.org/en-US/firefox/addon/react-devtools/)、そして [Edge](https://microsoftedge.microsoft.com/addons/detail/react-developer-tools/gpphkfbcpidddadnkolkpfckpihlkkil) ブラウザの拡張機能として利用できます。インストールすると、React を利用しているサイトでは *Components* タブがブラウザの開発者ツールに表示されるようになります。
924+
=======
925+
To inspect a particular component on the screen, use the button in the top left corner of the Components tab:
926+
927+
![inspecting with devtools](../images/tutorial/devtools-inspect.gif)
928+
>>>>>>> 2639f369946f763fff9a2572b0d7c4b9e2f83ebd
913929
914-
</Note>
915930
916931
## ゲームを完成させる {/*completing-the-game*/}
917932

src/content/reference/react-dom/components/form.md

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,53 @@ title: "<form>"
4848

4949
## 使用法 {/*usage*/}
5050

51+
<<<<<<< HEAD
5152
### クライアント上でフォーム送信を処理する {/*handle-form-submission-on-the-client*/}
5253

5354
フォームの `action` プロパティに関数を渡すことで、フォームが送信されたときにその関数が実行されるようにします。この関数には [`formData`](https://developer.mozilla.org/en-US/docs/Web/API/FormData) が引数として渡されるため、フォームが送信したデータにアクセスできます。これは URL のみを受け付ける本来の [HTML action](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/form#action) とは異なる、独自の動作です。`action` に指定された関数が成功した後、非制御のフィールド要素はすべてリセットされます。
55+
=======
56+
### Handle form submission with an event handler {/*handle-form-submission-with-an-event-handler*/}
57+
58+
Pass a function to the `onSubmit` event handler to run code when the form is submitted. By default, the browser sends the form data to the current URL and refreshes the page, so call [`e.preventDefault()`](https://developer.mozilla.org/en-US/docs/Web/API/Event/preventDefault) to override that behavior.
59+
60+
This example reads the submitted values with [`new FormData(e.target)`](https://developer.mozilla.org/en-US/docs/Web/API/FormData), which collects every field by its `name`. This keeps the inputs [uncontrolled](/reference/react-dom/components/input#reading-the-input-values-when-submitting-a-form). If you instead [control an input with state](/reference/react-dom/components/input#controlling-an-input-with-a-state-variable), read from that state on submit rather than from `FormData`.
61+
62+
<Sandpack>
63+
64+
```js src/App.js
65+
export default function Search() {
66+
function handleSubmit(e) {
67+
// Prevent the browser from reloading the page
68+
e.preventDefault();
69+
70+
// Read the form data
71+
const form = e.target;
72+
const formData = new FormData(form);
73+
const query = formData.get("query");
74+
alert(`You searched for '${query}'`);
75+
}
76+
77+
return (
78+
<form onSubmit={handleSubmit}>
79+
<input name="query" />
80+
<button type="submit">Search</button>
81+
</form>
82+
);
83+
}
84+
```
85+
86+
</Sandpack>
87+
88+
<Note>
89+
90+
Reading form data with `onSubmit` works in every version of React and gives you direct access to the [submit event](https://developer.mozilla.org/en-US/docs/Web/API/HTMLFormElement/submit_event), so you can call `e.preventDefault()` and read the data yourself. Passing the function to the `action` prop instead runs the submission in a [Transition](/reference/react/useTransition). React then tracks the pending state, sends thrown errors to the nearest error boundary, and lets the form work with [`useActionState`](/reference/react/useActionState) and [`useOptimistic`](/reference/react/useOptimistic). An `action` can also be a [Server Function](/reference/rsc/server-functions), which `onSubmit` does not support.
91+
92+
</Note>
93+
94+
### Handle form submission with an action prop {/*handle-form-submission-with-an-action-prop*/}
95+
96+
Pass a function to the `action` prop of form to run the function when the form is submitted. [`formData`](https://developer.mozilla.org/en-US/docs/Web/API/FormData) will be passed to the function as an argument so you can access the data submitted by the form. This differs from the conventional [HTML action](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/form#action), which only accepts URLs. Unlike `onSubmit`, an `action` runs in a [Transition](/reference/react/useTransition) and calling `e.preventDefault()` isn't needed. After the `action` function succeeds, all uncontrolled field elements in the form are reset.
97+
>>>>>>> 2639f369946f763fff9a2572b0d7c4b9e2f83ebd
5498
5599
<Sandpack>
56100

0 commit comments

Comments
 (0)