title: Fastify giving a react prop to a render with next.js
body: <p>I am using Next.js's example server with Fastify and experimenting with it and am wondering if there is a way to pass let's say a JSON object as a prop into a render? I've tried to find anything in the documentation and can't find anything for doing this. </p>
  
  <p>The server code I'm using is this,</p>
  
  <pre><code>const fastify = require('fastify')();
  const Next = require('next');
  
  const port = parseInt(process.env.PORT, 10) || 3000;
  const dev = process.env.NODE_ENV !== 'production';
  
  fastify.register((fastify, opts, next) =&gt; {
      const app = Next({ dev })
      app.prepare().then(() =&gt; {
  
          fastify.get('/', (req, res) =&gt; {
              let object = {"hello": "world"}; // object I want to pass as a prop
              return app.render(req.req, res.res, '/index', req.query).then(() =&gt; {
                  res.sent = true
              })
          })
  
          next()
      }).catch(err =&gt; next(err))
  })
  
  fastify.listen(port, err =&gt; {
      if (err) throw err
      console.log(`Ready on http://localhost:${port}`)
  })
  </code></pre>