makeomatic/redux-connect

DeprecationWarning: Unhandled promise rejections are deprecated.

オープン

#103 opened on 2017/01/23

 (1 件のコメント) (0 件のリアクション) (0 人の担当者)JavaScript (73 件のフォーク)batch import
help wantedquestion

Repository metrics

Stars
 (550 個のスター)
PR merge metrics
 (30d に merged PR はありません)

説明

Everything is working pretty well but when I refresh on 1 Container out of 5 that are using redux-connect, I get this:

(node:27184) DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

Then I realize, the documentation is missing catch for loadOnServer method. I think the Readme needs to be updated.

Example:

loadOnServer({...renderProps, store}).then(() => {
        const components = renderToStaticMarkup(
          <Provider store={store}>
             <ReduxAsyncConnect {...renderProps} />
          </Provider>
        );
        res.status(200);
        res.send('<!doctype html>\n' +
          renderToString(
            <InitialPage
              assets={webpackIsomorphicTools.assets()}
              component={components}
              store={store}
            />
          )
        );
      })
      .catch(err => {
        console.log('Caught Error in Server Render: ');
        console.log(err);
      });

コントリビューターガイド