Last active
May 3, 2020 22:49
-
-
Save PilgrimMemoirs/01ce60bf85cede9a821109f61a6fc60b to your computer and use it in GitHub Desktop.
React essentials tutorial
This file contains 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
// src/components/Park.js | |
import React from 'react' | |
function Park() { | |
return <h1>I'm a park!</h1> | |
} | |
export default Park; |
This file contains 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
// src/App.js | |
import React from 'react'; | |
import './App.css'; | |
import Park from './components/Park' | |
function App() { | |
return ( | |
<div className="App"> | |
<Park /> | |
</div> | |
); | |
} | |
export default App; |
This file contains 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
// src/components/Trail.js | |
import React from 'react'; | |
function Trail() { | |
return <h2>I'm a Trail!</h2> | |
} | |
export default Trail; |
This file contains 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
// src/components/Review.js | |
import React from 'react'; | |
function Review() { | |
return <h3>I'm a Review!</h3> | |
} | |
export default Review; |
This file contains 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
// src/components/Park.js | |
import React from 'react' | |
import Trail from './Trail' | |
function Park() { | |
return ( | |
<div className="Park"> | |
<h1>I'm a park!</h1> | |
<Trail /> | |
</div> | |
) | |
} | |
export default Park; |
This file contains 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
// src/App.js | |
import React from 'react'; | |
import './App.css'; | |
import Park from './components/Park' | |
function App() { | |
return ( | |
<div className="App"> | |
<Park /> | |
<Park /> | |
<Park /> | |
</div> | |
); | |
} | |
export default App; | |
// src/components/Park.js | |
import React from 'react'; | |
import Review from './Review' | |
import Trail from './Trail' | |
function Park() { | |
return ( | |
<div className="Park"> | |
<h1>I'm a Park!</h1> | |
<Trail /> | |
<Review /> | |
</div> | |
); | |
} | |
export default Park; | |
// src/components/Trail.js | |
import React from 'react'; | |
import Review from './Review' | |
function Trail() { | |
return ( | |
<div className="Trail"> | |
<h2> I'm a Trail! </h2> | |
<Review /> | |
</div> | |
); | |
} | |
export default Trail; | |
// src/components/Review.js | |
import React from 'react'; | |
function Review() { | |
return <h3>I'm a Review!</h3> | |
} | |
export default Review; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment