Created
August 20, 2018 18:03
-
-
Save pedrogk/5c4af199740bbd2244e21b5a8c1a5b82 to your computer and use it in GitHub Desktop.
Ejemplo de composicion en React
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function SplitPane(props) { | |
return ( | |
<div className="SplitPane"> | |
<div className="SplitPane-left"> | |
{props.left} | |
</div> | |
<div className="SplitPane-right"> | |
{props.right} | |
</div> | |
</div> | |
) | |
} | |
function App() { | |
return ( | |
<SplitPane | |
left={ | |
<Contacts /> | |
} | |
right={ | |
<Chat /> | |
} /> | |
) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment