2018-12-17 16:34:32 +00:00
|
|
|
import App, { Container } from 'next/app'
|
2018-06-19 19:50:37 +00:00
|
|
|
import React from 'react'
|
|
|
|
import { Provider } from 'unstated'
|
2018-12-05 10:32:45 +00:00
|
|
|
import { CounterContainer } from '../containers'
|
|
|
|
|
|
|
|
const counter = new CounterContainer()
|
2018-06-19 19:50:37 +00:00
|
|
|
|
|
|
|
class MyApp extends App {
|
|
|
|
render () {
|
2018-12-17 16:34:32 +00:00
|
|
|
const { Component, pageProps } = this.props
|
2018-06-19 19:50:37 +00:00
|
|
|
return (
|
|
|
|
<Container>
|
2018-12-05 10:32:45 +00:00
|
|
|
<Provider inject={[counter]}>
|
2018-06-19 19:50:37 +00:00
|
|
|
<Component {...pageProps} />
|
|
|
|
</Provider>
|
|
|
|
</Container>
|
|
|
|
)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
export default MyApp
|