Skip to content

Commit 74a52df

Browse files
author
jesse
committed
docs: modify translation to be closer to original text
1 parent 1e97b6a commit 74a52df

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

content/docs/composition-vs-inheritance.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@ function WelcomeDialog() {
5050
`<FancyBorder>` JSX タグの内側のあらゆる要素は `FancyBorder``children` という props として渡されます。 `FancyBorder``<div>` の内側に `{props.children}` をレンダリングするので、渡された要素が出力されます。
5151

5252
あまり一般的ではありませんが、複数の箇所に子要素を追加したいケースも考えられます。そのようなケースでは以下のように `children` の props の代わりに独自の props を作成して渡すことができます。
53-
この実装方法は他のライブラリで言うところの slot や yield のような考え方ですが、React のコンポーネントに props として渡せるものに制限はありません。
5453

5554
```js{5,8,18,21}
5655
function SplitPane(props) {
@@ -81,7 +80,8 @@ function App() {
8180

8281
[**Try it on CodePen**](https://codepen.io/gaearon/pen/gwZOJp?editors=0010)
8382

84-
`<Contacts />``<Chat />` のような React の要素はただのオブジェクトなので、他のあらゆるデータと同様に props として渡すことができます。
83+
`<Contacts />``<Chat />` のような React の要素はただのオブジェクトなので、他のあらゆるデータと同様に props として渡すことができます。このアプローチは他のライブラリで言うところの slot に似ていると感じるかもしれませんが、React のコンポーネントに props として渡せるものに制限はありません。
84+
8585

8686
## 特化したコンポーネント (Specialization)
8787

0 commit comments

Comments
 (0)