diff --git a/docs/api/applyMiddleware.md b/docs/api/applyMiddleware.md index 6067991406..bf6b82e3ec 100644 --- a/docs/api/applyMiddleware.md +++ b/docs/api/applyMiddleware.md @@ -173,10 +173,12 @@ function makeSandwichesForEverybody() { // This is very useful for server side rendering, because I can wait // until data is available, then synchronously render the app. +import { renderToString } from 'react-dom/server'; + store.dispatch( makeSandwichesForEverybody() ).then(() => - response.send(React.renderToString()) + response.send(renderToString()) ); // I can also dispatch a thunk async action from a component