title: How to using renderToNodeStream in React DOM Server that co-work with Templating Engines?
body: <p><code>renderToNodeStream</code> is a method that render React component to Stream in Node.js, It's a good practice to render result Steam other than String to reduce time to first meaningful paint. code like this:</p>
  
  <pre><code>const http = require('http')
  const React = require('react')
  const { renderToNodeStream } = require('react-dom/server')
  const { createStore } = require('redux')
  const App = require('./App')
  
  
  http
    .createServer((req, res) =&gt; {
      renderToNodeStream(App).pipe(res)
    })
    .listen(3000)
  
  </code></pre>
  
  <p>but, I want using some template engine like <a href="https://aui.github.io/art-template/" rel="nofollow noreferrer">art-template</a>, with extra data shared to client, like store which create by Redux.eg:</p>
  
  <pre><code>const http = require('http')
  const template = require('art-template')
  const React = require('react')
  const { renderToString } = require('react-dom/server')
  const App = require('./App')
  
  const store = createStore()
  
  http
    .createServer((req, res) =&gt; {
      const root = template(__dirname + '/index.art', {
        root: renderToString(App),
        store: store.getState(),
        //... other params that pass
      })
      res.write(root)
      res.end()
    })
    .listen(3000)
  
  </code></pre>
  
  <p>but it only support render to String instead of Stream. Is there some other way or Template Engine that support render result to Steam? Thanks first. :)</p>