From ba2fbc2b65394ba29bceba9d3c6494391bfb00ac Mon Sep 17 00:00:00 2001 From: Patrick Krawczykowski Date: Sat, 29 Aug 2020 22:23:42 -0500 Subject: [PATCH] Update _app.js to use a function component. (#16683) This PR updates the `_app.js` file to remove the `next/app` import. It's not needed with the latest versions of Next --- examples/with-styled-components/pages/_app.js | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/examples/with-styled-components/pages/_app.js b/examples/with-styled-components/pages/_app.js index cda1572395518..e9f49a88f663a 100644 --- a/examples/with-styled-components/pages/_app.js +++ b/examples/with-styled-components/pages/_app.js @@ -1,4 +1,3 @@ -import App from 'next/app' import { ThemeProvider } from 'styled-components' const theme = { @@ -7,13 +6,10 @@ const theme = { }, } -export default class MyApp extends App { - render() { - const { Component, pageProps } = this.props - return ( - - - - ) - } +export default function App({ Component, pageProps }) { + return ( + + + + ) }