File size: 356 Bytes
1e92f2d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
let mutatedRes

export async function getServerSideProps(context) {
  mutatedRes = context.res
  return {
    props: (async function () {
      return {
        text: 'res',
      }
    })(),
  }
}

export default ({ text }) => {
  mutatedRes.setHeader('test-header', 'this is a test header')

  return (
    <>
      <div>hello {text}</div>
    </>
  )
}