什么是`response.send`(来自redux-thunk的README.md)?

时间:2016-11-26 17:27:29

标签: redux-thunk

Composition section

中找到它

它来自哪里?

// This is very useful for server side rendering, because I can wait
// until data is available, then synchronously render the app.

store.dispatch(
  makeSandwichesForEverybody()
).then(() =>
  response.send(ReactDOMServer.renderToString(<MyApp store={store} />))
);

1 个答案:

答案 0 :(得分:0)

我相信它来自Javascript XMLHttpRequest

https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/send