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

Throw errors that occur during render #159

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

chrismcv
Copy link

I've been using react-loadable in a create-react-app application, and have found that errors thrown during the rendering of a resolved component are getting swallowed by react-loadable. Presently an error during render will not log anything meaningful in the console. I think it is preferable that they throw exception which react-error-overlay can catch and display.

I've been using react-loadable in a create-react-app application, and have found that errors thrown during the rendering of a resolved component are getting swallowed by react-loadable. Presently an error during render will not log anything meaningful in the console. I think it is preferable that they throw exception which react-error-overlay can catch and display.
@ghost
Copy link

ghost commented Sep 16, 2018

@chrismcv thanks for raising this. After a lengthy upgrade from React 15 and webpack 3 to the latest versions (plus all deps, groan) I found react-loader was not , well, loading. After hours of googling I spotted this PR and, sure enough, after bypassing react-loadable errors started to appear. Thank you thank you!

@8427003
Copy link

8427003 commented Sep 27, 2018

This is a very serious problem, pealse Hurry up

@julienben
Copy link

Until someone can put together a real fix which doesn't fail the tests, anybody wanting to use use react-loadable should stick to 5.3.1. (This bug was introduced in 5.4.0.)

@xdlrt
Copy link

xdlrt commented Oct 24, 2018

Has this problem solved?I'm using 5.5.0 with the same situation.

@julienben
Copy link

This repo seems abandoned since September. Your options are:

  • use 5.3.1
  • switch to loadable-components
  • use @jaybe78's fork where this has been merged (although I don't think it's been published to npm and I'm also not sure the test suite passes)

@jaybe78
Copy link

jaybe78 commented Oct 24, 2018

@julienben
Copy link

julienben commented Oct 24, 2018

Thanks @jaybe78!

I didn't think that it's on npm cause I didn't see a release here or a link in your fork's readme.

@jaybe78
Copy link

jaybe78 commented Oct 24, 2018

@julienben
NP just added it https://github.com/jaybe78/react-loadable/releases/tag/5.6.0
Please add PRs to my repo if you encounter any issues.

EDIT: Test suites pass
PASS tests/test.js (6.602s)
✓ loading success (423ms)
✓ delay and timeout (309ms)
✓ loading error (406ms)
✓ server side rendering (441ms)
✓ server side rendering es6 (451ms)
✓ preload (405ms)
✓ render (405ms)
✓ loadable map success (406ms)
✓ loadable map error (407ms)
preloadReady
✓ undefined (205ms)
✓ one (207ms)
✓ many (203ms)
✓ missing (204ms)
✓ delay with 0 (301ms)

Ran all test suites.
Thanks

@xdlrt
Copy link

xdlrt commented Oct 25, 2018

Thanks @julienben @jaybe78

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