2

我几乎完成了使用 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')
);
4

0 回答 0