Skip to content

Instantly share code, notes, and snippets.

@sumitkharche
Created June 26, 2019 17:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sumitkharche/fda0f044a18d968b13995557c5428690 to your computer and use it in GitHub Desktop.
Save sumitkharche/fda0f044a18d968b13995557c5428690 to your computer and use it in GitHub Desktop.
App.js
<Root>
<header className="header">
<h1 className="header-h1">React-Static & Cosmic JS blog</h1>
<nav className="header-nav">
<Link getProps={isActive} className="header-link" to="/">
Home
</Link>
<Link getProps={isActive} className="header-link" to="/about">
About
</Link>
</nav>
</header>
<div className="content">
<React.Suspense fallback={<em>Loading...</em>}>
<Router>
<Dynamic path="dynamic" />
<Routes path="*" />
</Router>
</React.Suspense>
</div>
<Root>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment