Skip to content

Instantly share code, notes, and snippets.

@nolimits4web
Last active March 5, 2021 16:06
Show Gist options
  • Select an option

  • Save nolimits4web/9c0c6321f89f79020a4ec888ee98dbf9 to your computer and use it in GitHub Desktop.

Select an option

Save nolimits4web/9c0c6321f89f79020a4ec888ee98dbf9 to your computer and use it in GitHub Desktop.

Revisions

  1. nolimits4web revised this gist Mar 5, 2021. 1 changed file with 3 additions and 0 deletions.
    3 changes: 3 additions & 0 deletions [postID].js
    Original file line number Diff line number Diff line change
    @@ -1,6 +1,9 @@
    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>
  2. nolimits4web revised this gist Mar 5, 2021. 1 changed file with 3 additions and 3 deletions.
    6 changes: 3 additions & 3 deletions [postID].js
    Original file line number Diff line number Diff line change
    @@ -1,14 +1,14 @@
    import { Block, Navbar, Page } from "framework7-react";

    export default function BlogPost(props) {
    const { postId, f7route } = props;
    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>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>
    <p>Post ID: <b>{postID}</b></p>
    </Block>
    </Page>
    )
  3. nolimits4web created this gist Mar 5, 2021.
    15 changes: 15 additions & 0 deletions [postID].js
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,15 @@
    import { Block, Navbar, Page } from "framework7-react";

    export default function BlogPost(props) {
    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>
    )
    }