File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff 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} 
5655function 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
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments