2b9268a911
## Changes see commits ## Context As discussed in https://github.com/vercel/next.js/pull/40302#issuecomment-1239238966 we are going to merge the mobx examples. #40302 ## Documentation / Examples - [x] Make sure the linting passes by running `pnpm lint` - [x] The examples guidelines are followed from [our contributing doc](https://github.com/vercel/next.js/blob/canary/contributing.md#adding-examples)
12 lines
278 B
TypeScript
12 lines
278 B
TypeScript
import { Provider } from 'mobx-react'
|
|
import { useStore } from '../store'
|
|
|
|
export default function App({ Component, pageProps }) {
|
|
const store = useStore(pageProps.initialState)
|
|
|
|
return (
|
|
<Provider store={store}>
|
|
<Component {...pageProps} />
|
|
</Provider>
|
|
)
|
|
}
|