Commit ea0d916b authored by Michael Stramel's avatar Michael Stramel Committed by Joe Haddad

example: Convert _app.js to functional components (#10115)

Fix formatting
parent 34f1aefa
import React from 'react' import React from 'react'
import App from 'next/app'
class Layout extends React.Component { const Layout = ({ children }) => <div className="layout">{children}</div>
render() {
const { children } = this.props
return <div className="layout">{children}</div>
}
}
export default class MyApp extends App { export default ({ Component, pageProps }) => (
render() { <Layout>
const { Component, pageProps } = this.props <Component {...pageProps} />
return ( </Layout>
<Layout> )
<Component {...pageProps} />
</Layout>
)
}
}
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