leekb_
leekb_
SSolidJS
Created by leekb_ on 5/7/2023 in #support
ErrorBoundry component not works
hi now i am doing official-tutorial : https://www.solidjs.com/tutorial/flow_error_boundary I copy-and-paste this code in my vite project. the full-code is below this
import { Component, ErrorBoundary, createEffect, createSignal, useContext, useTransition } from 'solid-js';
import {render} from 'solid-js/web'

const Broken = (props) => {
throw new Error("Oh No");
return <>Never Getting Here</>
}

export const ErrorBoundryTest = () => {

return (
<div class="">
<div class="">before error</div>
<ErrorBoundary fallback={err => err}>
<Broken />
</ErrorBoundary>
<div class="">after error</div>
</div>
);
};
import { Component, ErrorBoundary, createEffect, createSignal, useContext, useTransition } from 'solid-js';
import {render} from 'solid-js/web'

const Broken = (props) => {
throw new Error("Oh No");
return <>Never Getting Here</>
}

export const ErrorBoundryTest = () => {

return (
<div class="">
<div class="">before error</div>
<ErrorBoundary fallback={err => err}>
<Broken />
</ErrorBoundary>
<div class="">after error</div>
</div>
);
};
and it doesn't show anything about error. but It works on solid-playground I never found what is difference between my project and solid-playground. and feedbacks are helpful to me thank you
5 replies