diff --git a/examples/with-prefetching/components/Header.js b/examples/with-prefetching/components/Header.js index 264c7aeb56..2317aee48e 100644 --- a/examples/with-prefetching/components/Header.js +++ b/examples/with-prefetching/components/Header.js @@ -1,32 +1,30 @@ -import React from 'react' import Link, { prefetch } from 'next/prefetch' - -// Prefetch using the imperative API -prefetch('/') - -const styles = { - a: { - marginRight: 10 - } -} +import RegularLink from 'next/link' export default () => (
{ /* Prefetch using the declarative API */ } - Home + Home - Features + Features - - About - + { /* we imperatively prefetch on hover */ } + + prefetch('/about') && console.log('prefetching /about!') }>About + - Contact (NO-PREFETCHING) + Contact (NO-PREFETCHING) + +
)