Skip to content

ErrorElement not rendered #255

@DiederikvandenB

Description

@DiederikvandenB

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions