Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DeprecationWarning: Unhandled promise rejections are deprecated. #103

Open
Mikeysax opened this issue Jan 23, 2017 · 1 comment
Open

DeprecationWarning: Unhandled promise rejections are deprecated. #103

Mikeysax opened this issue Jan 23, 2017 · 1 comment

Comments

@Mikeysax
Copy link

Mikeysax commented Jan 23, 2017

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);
      });
@AVVS
Copy link
Member

AVVS commented Feb 8, 2017

Sure, please send a PR!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants