Types for ErrorBoundary?
See original GitHub issuereact-error-boundary
version: 2.3.1node
version:14.4npm
version: 6.4.7
Relevant code or config
<ErrorBoundary FallbackComponent={errorFallback}>
</ErrorBoundary>
What you did: Wrapped a section of JSX with the ErrorBoundary component
What happened:
Visual Studio Code complains with a red squiglly line that “no overload matches this call”
Problem description:
I am thinking that the reason that the JSX for ErrorBoundary is causing a warning is that this is inside of a .tsx component and I need type information for the props for ErrorBoundary.
Suggested solution:
Documentation on how to use ErrorBoundary in a TypeScript component.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:3
- Comments:6
Top Results From Across the Web
Error Boundaries - React TypeScript Cheatsheets
React-error-boundary - is a lightweight package ready to use for this scenario with TS support built-in. This approach also lets you avoid class...
Read more >Error Boundaries - React
A class component becomes an error boundary if it defines either (or both) of the lifecycle methods static getDerivedStateFromError() or componentDidCatch() .
Read more >How to properly type a React ErrorBoundary class component ...
This question is about the types for this ErrorBoundary class component. I'm breaking it into parts to make it easier.
Read more >react-error-boundary - npm
This component provides a simple and reusable wrapper that you can use to wrap around your components. Any rendering errors in your components ......
Read more >react/error-boundaries.md at main · typescript-cheatsheets/react
React-error-boundary - is a lightweight package ready to use for this scenario with TS support built-in. This approach also lets you avoid class...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
If you add type to your props will work
Thank you. That is what I was looking for.