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

Errors thrown within child components are not bubbling up #143

Open
dbishoponline opened this issue Dec 20, 2016 · 1 comment
Open

Errors thrown within child components are not bubbling up #143

dbishoponline opened this issue Dec 20, 2016 · 1 comment

Comments

@dbishoponline
Copy link

dbishoponline commented Dec 20, 2016

Question:

If I compose an App component like this compose(composeFunc)(App). Then, inside the App component there is a <Header />. Inside the Header, there is a <Logo /> component. The Logo component is a dumb component:

import React, {Component} from 'react'

const Logo = ({ name }) => (
    <span>{name}</span>
)

export default Logo

That all works, but say I change the 'name' prop to.. 'names' (which should throw an error)...all that happens is the default "Loading..." displays but no error is logged to the console. Below is the code, with the change, that should throw an error:

import React, {Component} from 'react'

const Logo = ({ name }) => (
    <span>{names}</span>
)

export default Logo

When <App /> is NOT composed , the error from Logo displays correctly in the console.

Logo.jsx:3 Uncaught ReferenceError: names is not defined

Any ideas why the error is not getting logged or bubbled up to the composer?

Thanks :)

@arunoda
Copy link
Owner

arunoda commented Dec 20, 2016

Better if you can send me a sample app, where I can see try this locally.

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

No branches or pull requests

2 participants