Skip to content

Instantly share code, notes, and snippets.

@dangdennis
Created December 1, 2018 03:54
Show Gist options
  • Select an option

  • Save dangdennis/805869c2beb0cdc40382e2a2fb477a0d to your computer and use it in GitHub Desktop.

Select an option

Save dangdennis/805869c2beb0cdc40382e2a2fb477a0d to your computer and use it in GitHub Desktop.
render: self =>
<div>
<ul>
<li> <Link href="/"> {str("Home")} </Link> </li>
<li> <Link href="/page1"> {str("Page 1")} </Link> </li>
<li> <Link href="/page2"> {str("Page 2")} </Link> </li>
<li> <Link href="/page3"> {str("Page 3")} </Link> </li>
<li> <Link href="/nested/page4"> {str("Nested Page")} </Link> </li>
<li> <Link href="/auth/*"> {str("Wild Card Auth Page")} </Link> </li>
</ul>
<div>
{
switch (self.state.route) {
| Home => <h1> {str("You've reached the home page")} </h1>
| Page1 => <h1> {str("You've reached page 1")} </h1>
| Page2 => <h1> {str("You've reached page 2")} </h1>
| Page3 => <h1> {str("You've reached page 3")} </h1>
| Page4 => <h1> {str("You've reached page 4")} </h1>
| WildCardPage(id) =>
<h1> {str("You've reached auth wild card: " ++ id)} </h1>
| NotFound => <h1> {str("404 Page")} </h1>
}
}
</div>
</div>,
@MatthewStephens1
Copy link

Hello I'm new and just wanted to introduce myself. What is it that your working on? If you don't mind me asking?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment