Skip to content

Throw errors that occur during render#159

Open
chrismcv wants to merge 1 commit into
jamiebuilds:masterfrom
chrismcv:throw-exceptions
Open

Throw errors that occur during render#159
chrismcv wants to merge 1 commit into
jamiebuilds:masterfrom
chrismcv:throw-exceptions

Conversation

@chrismcv

Copy link
Copy Markdown

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

ghost commented Sep 16, 2018

Copy link
Copy Markdown

@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

8427003 commented Sep 27, 2018

Copy link
Copy Markdown

This is a very serious problem, pealse Hurry up

@julienben

Copy link
Copy Markdown

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

xdlrt commented Oct 24, 2018

Copy link
Copy Markdown

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

@julienben

Copy link
Copy Markdown

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

jaybe78 commented Oct 24, 2018

Copy link
Copy Markdown

@julienben

julienben commented Oct 24, 2018

Copy link
Copy Markdown

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

jaybe78 commented Oct 24, 2018

Copy link
Copy Markdown

@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

xdlrt commented Oct 25, 2018

Copy link
Copy Markdown

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

Development

Successfully merging this pull request may close these issues.

5 participants