rsnext/test/integration/export-default-map
Joe Haddad 39761e5ce7 Remove withAmp and do not expose isInAmpMode (#7690)
* Remove `withAmp` and do not expose `isInAmpMode`
This pull request removes the `withAmp` higher-order component in favor of the exported configuration object.
Retaining this backwards compatibility isn't worth the extra maintenance burden, given it hasn't been released for very long and the migration is ultra-simple.

I'm 👎 on retaining backwards compatibility just for the sake of it.

Migration example follows. I'm willing to write a codemod if reviewers feel it's necessary.

*Before*
```js
import { withAmp } from 'next/amp'

function Home() {
  return <h1>My AMP Page</h1>
}

export default withAmp(Home)
// or
export default withAmp(Home, { hybrid: true })
```

*After*
```js
export default function Home() {
  return <h1>My AMP Page</h1>
}

export const config = {
  amp: true,
  // or
  amp: 'hybrid',
}
```

* Fix { amp: 'hybrid' }

Co-Authored-By: JJ Kasper <jj@jjsweb.site>
2019-06-28 15:04:24 -07:00
..
pages Remove withAmp and do not expose isInAmpMode (#7690) 2019-06-28 15:04:24 -07:00
test Unflag Automatic Prerendering (#7666) 2019-06-28 16:01:11 -04:00