Suppose I have a middleware that adds some data fields to express.js req object. I want to inject these fields into my React components through my Next.js _app.js implementation. How do I access req inside _app.js?
try this static async getInitialProps({ Component, ctx }) { and inside the function ctx.req
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With