Commit a9325f12 authored by Henrik Wenz's avatar Henrik Wenz Committed by Joe Haddad

Remove prefetch attributes from examples (#8481)

* Remove prefetch from with-apollo-and-redux-saga example

Next.js auto-prefetches automatically based on viewport. The prefetch attribute is no longer needed. More: https://err.sh/zeit/next.js/prefetch-true-deprecated

* Remove prefetch from using-inferno example

Next.js auto-prefetches automatically based on viewport. The prefetch attribute is no longer needed. More: https://err.sh/zeit/next.js/prefetch-true-deprecated

* Remove prefetch from with-apollo-and-redux example

Next.js auto-prefetches automatically based on viewport. The prefetch attribute is no longer needed. More: https://err.sh/zeit/next.js/prefetch-true-deprecated

* Remove prefetch from with-apollo-auth example

Next.js auto-prefetches automatically based on viewport. The prefetch attribute is no longer needed. More: https://err.sh/zeit/next.js/prefetch-true-deprecated

* Remove prefetch from with-tailwindcss example

Next.js auto-prefetches automatically based on viewport. The prefetch attribute is no longer needed. More: https://err.sh/zeit/next.js/prefetch-true-deprecated

* Remove prefetch from with-graphql-hooks example

Next.js auto-prefetches automatically based on viewport. The prefetch attribute is no longer needed. More: https://err.sh/zeit/next.js/prefetch-true-deprecated

* Remove prefetch from data-fetch example

Next.js auto-prefetches automatically based on viewport. The prefetch attribute is no longer needed. More: https://err.sh/zeit/next.js/prefetch-true-deprecated
parent 7eda3bc6
...@@ -14,7 +14,7 @@ export default class Index extends React.Component { ...@@ -14,7 +14,7 @@ export default class Index extends React.Component {
return ( return (
<div> <div>
<p>Next.js has {this.props.stars} ⭐️</p> <p>Next.js has {this.props.stars} ⭐️</p>
<Link prefetch href='/preact'> <Link href='/preact'>
<a>How about preact?</a> <a>How about preact?</a>
</Link> </Link>
</div> </div>
......
...@@ -14,7 +14,7 @@ export default class Preact extends React.Component { ...@@ -14,7 +14,7 @@ export default class Preact extends React.Component {
return ( return (
<div> <div>
<p>Preact has {this.props.stars} ⭝︝</p> <p>Preact has {this.props.stars} ⭝︝</p>
<Link prefetch href='/'> <Link href='/'>
<a>I bet next has more stars (?)</a> <a>I bet next has more stars (?)</a>
</Link> </Link>
</div> </div>
......
...@@ -4,7 +4,7 @@ import Link from 'next/link' ...@@ -4,7 +4,7 @@ import Link from 'next/link'
export default () => ( export default () => (
<div> <div>
Hello World.{' '} Hello World.{' '}
<Link prefetch href='/about'> <Link href='/about'>
<a>About</a> <a>About</a>
</Link> </Link>
</div> </div>
......
...@@ -3,13 +3,13 @@ import { withRouter } from 'next/router' ...@@ -3,13 +3,13 @@ import { withRouter } from 'next/router'
const Header = ({ router: { pathname } }) => ( const Header = ({ router: { pathname } }) => (
<header> <header>
<Link prefetch href='/'> <Link href='/'>
<a className={pathname === '/' ? 'is-active' : ''}>Home</a> <a className={pathname === '/' ? 'is-active' : ''}>Home</a>
</Link> </Link>
<Link prefetch href='/about'> <Link href='/about'>
<a className={pathname === '/about' ? 'is-active' : ''}>About</a> <a className={pathname === '/about' ? 'is-active' : ''}>About</a>
</Link> </Link>
<Link prefetch href='/blog'> <Link href='/blog'>
<a className={pathname === '/blog' ? 'is-active' : ''}>Blog</a> <a className={pathname === '/blog' ? 'is-active' : ''}>Blog</a>
</Link> </Link>
<style jsx>{` <style jsx>{`
......
...@@ -3,13 +3,13 @@ import { withRouter } from 'next/router' ...@@ -3,13 +3,13 @@ import { withRouter } from 'next/router'
const Header = ({ router: { pathname } }) => ( const Header = ({ router: { pathname } }) => (
<header> <header>
<Link prefetch href='/'> <Link href='/'>
<a className={pathname === '/' ? 'is-active' : ''}>Home</a> <a className={pathname === '/' ? 'is-active' : ''}>Home</a>
</Link> </Link>
<Link prefetch href='/apollo'> <Link href='/apollo'>
<a className={pathname === '/apollo' ? 'is-active' : ''}>Apollo</a> <a className={pathname === '/apollo' ? 'is-active' : ''}>Apollo</a>
</Link> </Link>
<Link prefetch href='/redux'> <Link href='/redux'>
<a className={pathname === '/redux' ? 'is-active' : ''}>Redux</a> <a className={pathname === '/redux' ? 'is-active' : ''}>Redux</a>
</Link> </Link>
<style jsx>{` <style jsx>{`
......
...@@ -26,7 +26,7 @@ export default class CreateAccount extends React.Component { ...@@ -26,7 +26,7 @@ export default class CreateAccount extends React.Component {
<RegisterBox /> <RegisterBox />
<hr /> <hr />
Already have an account?{' '} Already have an account?{' '}
<Link prefetch href='/signin'> <Link href='/signin'>
<a>Sign in</a> <a>Sign in</a>
</Link> </Link>
</> </>
......
...@@ -26,7 +26,7 @@ export default class Signin extends React.Component { ...@@ -26,7 +26,7 @@ export default class Signin extends React.Component {
<SigninBox /> <SigninBox />
<hr /> <hr />
New?{' '} New?{' '}
<Link prefetch href='/create-account'> <Link href='/create-account'>
<a>Create account</a> <a>Create account</a>
</Link> </Link>
</React.Fragment> </React.Fragment>
......
...@@ -3,10 +3,10 @@ import { withRouter } from 'next/router' ...@@ -3,10 +3,10 @@ import { withRouter } from 'next/router'
const Header = ({ router: { pathname } }) => ( const Header = ({ router: { pathname } }) => (
<header> <header>
<Link prefetch href='/'> <Link href='/'>
<a className={pathname === '/' ? 'is-active' : ''}>Home</a> <a className={pathname === '/' ? 'is-active' : ''}>Home</a>
</Link> </Link>
<Link prefetch href='/about'> <Link href='/about'>
<a className={pathname === '/about' ? 'is-active' : ''}>About</a> <a className={pathname === '/about' ? 'is-active' : ''}>About</a>
</Link> </Link>
<style jsx>{` <style jsx>{`
......
...@@ -10,7 +10,7 @@ export default function Nav () { ...@@ -10,7 +10,7 @@ export default function Nav () {
<nav> <nav>
<ul className='flex justify-between items-center p-8'> <ul className='flex justify-between items-center p-8'>
<li> <li>
<Link prefetch href='/'> <Link href='/'>
<a className='text-blue-500 no-underline'>Home</a> <a className='text-blue-500 no-underline'>Home</a>
</Link> </Link>
</li> </li>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment