Created
January 25, 2019 15:05
-
-
Save ahuggins/23843e0228fec3ae6e11c1fb2960ca4c to your computer and use it in GitHub Desktop.
Another simple component example
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
| import React from 'react'; | |
| export function Foo() { | |
| return <div> | |
| <div className="fooClass"> | |
| <Bar className="someCustomClass" /> | |
| </div> | |
| </div>; | |
| } | |
| export function Bar(props) { | |
| return <div> | |
| <div className="barClass"> | |
| <Baz {...props} /> | |
| </div> | |
| </div>; | |
| } | |
| export function Baz(props) { | |
| return <div> | |
| <div {...props}> | |
| <h1>Baz is rendered</h1> | |
| </div> | |
| </div>; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment