Skip to content

Make theme-related errors more descriptive #870

@craigpalermo

Description

@craigpalermo

Is your feature request related to a problem? Please describe.
In many cases, when we see an error like Uncaught TypeError: Cannot read property '3' of undefined, the root cause is that a styled component can't access the theme. This could be for many reasons; the app doesn't have a theme provider, the app has imported multiple instances of styled-components, etc.

Describe the solution you'd like
If an exception like this is thrown from within a styled component, we should hint at this being the cause.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions