未定义React SSR文档

时间:2018-07-28 16:21:32

标签: reactjs react-ssr

我几乎完成了用电影应用程序更新带有SSR(RRv2.3)和webpack 1x代码库的旧React(v15.2x)的工作。我几乎将所有内容都更新为当前内容(RRv3.2x除外)。

我收到此错误

Warning: Failed prop type: The prop `store.subscribe` is marked as required in `Provider`, but its value is `undefined`.
    in Provider
/home/david/tutorials/react/mgbp/mgbp-default-refactored/build/bundle.js:845
), document.getElementById('app'));
   ^

ReferenceError: document is not defined

及其代码中的

ReactDOM.render(
  <Provider store={store}>
    <Router history={browserHistory} routes={getRoutes(store)}/>
  </Provider>,
  document.getElementById('app')
);

0 个答案:

没有答案