rsnext/examples/with-mobx-react-lite/pages/_app.js
Luis Alvarez D 1239d5af59
[Examples] Update mobx examples to not use SSR (#11576)
* Updated with-custom-reverse-proxy

* Updated readme of with-env-from-next-config-js

* Updated the kea example

* Updated with-mobx

* Updated with-mobx readme

* Updated the with-mobx-react-lite example
2020-04-07 09:48:13 -04:00

11 lines
372 B
JavaScript

import { InjectStoreContext } from '../store'
export default function App({ Component, pageProps }) {
// If your page has Next.js data fetching methods returning a state for the Mobx store,
// then you can hydrate it here.
return (
<InjectStoreContext initialData={pageProps.initialStoreData}>
<Component {...pageProps} />
</InjectStoreContext>
)
}