-
Notifications
You must be signed in to change notification settings - Fork 405
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Duplicates
- I have searched the existing issues
Latest version
- I have tested the latest version
Current behavior 😯
ErrorBoundary not catch error in children node.
export function PageLayout({ children }: { children?: JSXElement }) {
return (
<ErrorBoundary fallback={<div>Error PageLayout</div>} >
{children}
</ErrorBoundary>
)
}Expected behavior 🤔
should catch error like in this case: Pass by props.
export function PageLayoutWorks({ children }: { children: () => JSXElement }) {
return (
<ErrorBoundary fallback={<div>Error PageLayoutWorks</div>} >
{children()}
</ErrorBoundary>
)
}Steps to reproduce 🕹
Full Example: https://github.com/PawelJastrzebski/solidStart_error_boundry
Context 🔦
Catch errors on page Layout level.
I'm not sure if this supposed to work on the children level, or is it not working on children level by design?
Your environment 🌎
Node: v20.18.0
Npm: 10.8.2
OS: Ubuntu 24.04 noble
Kernel: x86_64 Linux 6.8.0-48-generic
"dependencies": {
"@solidjs/meta": "^0.29.4",
"@solidjs/router": "^0.15.0",
"@solidjs/start": "^1.0.10",
"solid-js": "^1.9.2",
"vinxi": "^0.4.3"
}Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working