This file contains hidden or 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'; | |
| export default ({title = 'How tight is this next.js thing?'}) => <h2>{title}</h2>; |
This file contains hidden or 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
| // Will NOT prefetch route | |
| <Link href="/blog" /> | |
| // Will have response cached and ready to go :) | |
| <Link prefetch href="/blog" /> |
This file contains hidden or 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
| #https://egghead.io/lessons/javascript-how-to-fork-and-clone-a-github-repository | |
| # Step 1 - Fork Repo want to work with & clone it to your machine. | |
| git clone https://github.com/tgrecojs/example-repo | |
| # cd into repo | |
| cd example-repo | |
| # Add upstream branch | |
| git remote add upstream https://github.com/<repoOwner>/example-repo | |
| # fetch upstream branches | |
| git fetch upstream | |
| # Point master branch of forked repo to the upstream repo's master branch |
This file contains hidden or 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
| const test = require('tape'); | |
| const Benchmark = require('benchmark'); | |
| const suite = new Benchmark.Suite; | |
| const trace = label => val => { | |
| console.log(`${label}: ${val}`); | |
| return val; | |
| }; | |
This file contains hidden or 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
| const DynamicFoo = | |
| dynamic(import('../Posts.tipe').then(response => { | |
| // post2 is alias | |
| const { post2 } = response; | |
| // Foo.__webpackChunkName = m.__webpackChunkName; | |
| return response | |
| })); |
This file contains hidden or 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
| query API { | |
| post1: BlogPosts(id: "5aa48ebb5150d400139136c9") { | |
| calender | |
| postBody | |
| description | |
| _meta { | |
| id | |
| name | |
| } | |
| } |
This file contains hidden or 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
| query API { | |
| post1: BlogPosts(id: "5aa48ebb5150d400139136c9") { | |
| postBody | |
| description | |
| _meta { | |
| name | |
| } | |
| } | |
| post2: BlogPosts(id : "5aa4a49c106e4d0013bf87d8") { | |
| postBody |