question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ErrorElement not rendered

See original GitHub issue

Describe the bug

I am not sure the errorElement is working as it should, or whether I am misunderstanding it.

See this fork of the basic example: https://codesandbox.io/s/stupefied-mountain-6shsph?file=/src/index.tsx

I would expect the <h1>error</h1> to be rendered for the root page, yet I see the normal element. Is this a bug?

Cheers

Your Example Website or App

https://codesandbox.io/s/stupefied-mountain-6shsph?file=/src/index.tsx

Steps to Reproduce the Bug or Issue

  1. Click on home
  2. See “Welcome Home!”

Expected behavior

  1. Click on home
  2. See <div><h1>error</h1></div>

Screenshots or Videos

No response

Platform

  • OS: macOS 12.3
  • Browser: Safari 15.4
  • Version: 3.7.4

Additional context

No response

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:5
  • Comments:14

github_iconTop GitHub Comments

4reactions
tannerlinsleycommented, Apr 2, 2022

Known issue. Working on it.

Tanner Linsley On Apr 2, 2022, 9:48 AM -0700, Diederik van den Burger @.***>, wrote:

#249 I see this issue was reported here too. However, I went all the way back to the latest stable version (3.5.2 I believe?) and even there the issue occurred. — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you are subscribed to this thread.Message ID: @.***>

3reactions
tannerlinsleycommented, May 4, 2022

I am working on a fix for this, but don’t have an ETA yet. I’m pretty heads down in React Table this week. Re: @DiederikvandenB, I would say unless you’re in dire need of the better search param APIs of react-location, you’d be better off waiting for the next react-router version with all of the async loader features.

Read more comments on GitHub >

github_iconTop Results From Across the Web

ErrorElement not rendered · Issue #255 · TanStack/router
Describe the bug. I am not sure the errorElement is working as it should, or whether I am misunderstanding it. See this fork...
Read more >
errorElement v6.6.1 - React Router
errorElement. When exceptions are thrown in loaders, actions, or component rendering, instead of the normal render path for your Routes ( <Route element>...
Read more >
React Router 6 show error in element when using loader
The errorElement is what is rendered when an error is thrown during the loading of the route. If you want the routed component...
Read more >
Route Elements | React Location - TanStack
errorElement : A React element to render when the route is matched but an ... lack of an errorElement on the route; In...
Read more >
IOS error - Element not showing - General - Forum | Webflow
This is an issue with mobile Safari not rendering gradient applied to text properly. Can you please try the following? Go into your...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found