Ah sorry for the delay... not receiving dev notifications on my email for some reason.
You can read pageProps on _app.tsx (nextjs.org/docs/advanced-features/...) and add that to a global provider. You can read that with useContext on any componeny you want!
Do it on the render function though. If you add a custom getInitialProps on _app.tsx you disable all kinds of static optimizations!
Ah sorry for the delay... not receiving
dev
notifications on my email for some reason.You can read
pageProps
on_app.tsx
(nextjs.org/docs/advanced-features/...) and add that to a global provider. You can read that withuseContext
on any componeny you want!Do it on the render function though. If you add a custom
getInitialProps
on_app.tsx
you disable all kinds of static optimizations!Thanks for the reply! Will definitely try this out :)