Skip to content
Source
Sign inSign up
TanStack/router

ErrorElement not rendered #255

Send to my agent
ClosedDiederikvandenB(GitHub profile, opens in a new tab) opened this issue 14 comments

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

  1. https://github.com/TanStack/react-location/discussions/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.

  2. 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: @.***>

  3. Anything I can do to help? I wouldn't mind diving in to the code and submit a PR, if you're not too close to fixing it yourself already.

  4. Does anyone have a workaround for this issue?

  5. @robcaldecott not sure if this is the way to go for this problem, but for me it seems to resolve the issue.

    https://github.com/DiederikvandenB/react-location/commit/4b7d9c943811836c449d650c2d4c5b708d58aca4

  6. Hi @tannerlinsley, could you provide an update on this bug's status? If you can't deal with this right now, that's perfectly fine of course, but if support for this package is not on your roadmap, we'd love to hear that now before fully committing to using it.

  7. @DiederikvandenB same here. I'm hesitating between react-router or react-location, some features of react-location are appealing but it feels unfinished.

  8. 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.

  9. Alright, thanks for your response Tanner!

  10. Is there any update on this?

  11. @robcaldecott not sure if this is the way to go for this problem, but for me it seems to resolve the issue.

    DiederikvandenB@4b7d9c9

    If you're still using this workaround, has it continued working for you? I'm thinking of just doing the same thing you did but I'm not sure if it'll break anything else.

  12. @tom-ricci, it seems to be running stable, but only in our develop environment. UAT starts this week.

    We are however still considering switching back to react-router once their merge with Remix' router is finished. See: https://github.com/remix-run/react-router/pull/8855 and https://github.com/remix-run/react-router/tree/remixing

  13. tannerlinsley closed this

Sign in to join this conversation.