Skip to content

Instantly share code, notes, and snippets.

@nolimits4web
Last active March 5, 2021 16:06
Show Gist options
  • Save nolimits4web/9c0c6321f89f79020a4ec888ee98dbf9 to your computer and use it in GitHub Desktop.
Save nolimits4web/9c0c6321f89f79020a4ec888ee98dbf9 to your computer and use it in GitHub Desktop.
blog/[postID].js
import { Block, Navbar, Page } from "framework7-react";
export default function BlogPost(props) {
/*
we use Framework7 router and its features
*/
const { postID, f7route } = props;
return (
<Page>
<Navbar title="Post" backLink="Back" />
<Block strong>
<p>This is a dynamic route loaded from <code>/blog/[postID].js</code> page component.</p>
<p>Route URL: <b>{f7route.url}</b></p>
<p>Post ID: <b>{postID}</b></p>
</Block>
</Page>
)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment