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