RickWong / react-transmit

Relay-inspired library based on Promises instead of GraphQL.
BSD 3-Clause "New" or "Revised" License
1.32k stars 61 forks source link

`content.reactData` in `renderToString` callback is an array not an object? #62

Open ghost opened 8 years ago

ghost commented 8 years ago

I'm trying to update our NPM packages, and I'm having difficulty getting Transmit to work again.

In our server.js file, in our onPreResponse callback function, we're invoking:

Transmit.renderToString(App, props).then(function (content) { 
  /* Render app with content's React string and data. */ 
}).catch(function (err) { /* Handle error. */ });

Within the callback function for renderToString, the parameter content is an object with two props, reactString and reactData.

content.reactString is the HTML to render (as expected). But content.reactData is an empty array (whereas I'm expecting an object with the data for our app).

Would you have ideas as to why reactData would be an empty array rather than a populated object?

Thank you.