Last active
July 18, 2021 15:55
-
-
Save ross-u/2b5b1832bad24c0207bd1dc7e443239c to your computer and use it in GitHub Desktop.
m3 react routing intro starter code
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
import React from 'react' | |
function AboutPage() { | |
return ( | |
<div> | |
<h1>About</h1> | |
<img src="https://media.giphy.com/media/dWkyPssovVa6Y/giphy.gif" alt="the-office-gif" width="800px" height="auto"/> | |
</div> | |
) | |
} | |
export default AboutPage; |
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
import React from 'react' | |
function ErrorPage() { | |
return ( | |
<div> | |
<h1>404</h1> | |
<img | |
src="https://media.giphy.com/media/8L0Pky6C83SzkzU55a/giphy.gif" | |
alt="404-error-gif" | |
width="800px" | |
height="auto" | |
/> | |
</div> | |
) | |
} | |
export default ErrorPage; |
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
import React, { Component } from 'react' | |
class HomePage extends Component { | |
render() { | |
return ( | |
<div> | |
<h1>Home</h1> | |
<img src="https://media.giphy.com/media/3oKIPEqDGUULpEU0aQ/giphy.gif" alt="dashboard-gif"/> | |
</div> | |
) | |
} | |
} | |
export default HomePage; |
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
import { useState } from "react"; | |
function Projects() { | |
const [projects, setProjects] = useState([]); | |
return ( | |
<div> | |
<h2>Projects</h2> | |
{projects.map((project) => { | |
return ( | |
<div key={project.id} className="project"> | |
<h3>{project.name}</h3> | |
<p>{project.technologies}</p> | |
</div> | |
); | |
})} | |
</div> | |
); | |
} | |
export default Projects; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment