Skip to content

Error message unclear Β #2

@veroo-m

Description

@veroo-m
const { container } = render(
  <div>
    <someLayeredComponent {...defaultProps} />
  </div>,
)

While rendering this element I would get this error

'Error: Uncaught [TypeError: Cannot read property 'host' of undefined]' 
' console.error node_modules/react-dom/cjs/react-dom.development.js:17117
    The above error occurred in the <Context.Consumer> component:
        in Layer (created by Modal)
        in Modal
    
    Consider adding an error boundary to your tree to customize error handling behavior.
    Visit https://fb.me/react-error-boundaries to learn more about error boundaries.'

The error logged in unclear as it doesn't specify that the error comes from the usage if this library, nor it's mentioned that the component should be rendered as:

const { container } = render(
  <LayersManager>
    <someLayeredComponent  {...defaultProps} />
  </LayersManager>,
)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions