Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Same code works in playground but doesn't in tutorial

Đang mở
#445 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
2/5
Thời gian dự kiến
1-3 giờ
Mức phù hợp với người mới
52/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
javascript, typescript
Lĩnh vực
documentation, frontend

Hướng nghiên cứu

Open the linked ErrorBoundary tutorial and compare its example with the working playground code. Reproduce the failure in the tutorial, then update the tutorial example so the fallback renders as shown and confirm the linked tutorial works.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

I was going through the tutorial of ErrorBoundary: https://www.solidjs.com/tutorial/flow_error_boundary but couldn't get ErrorBoundary to work. However the same code works in playground:

import { render } from "solid-js/web";
import { ErrorBoundary } from "solid-js";

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

function App() {
  return (
    <>
      <div>Before</div>
      <ErrorBoundary fallback={(e) => <h2>Oh no! An Error!</h2>}>
        <Broken />
      </ErrorBoundary>
      <div>After</div>
    </>
  );
}

render(() => <App />, document.getElementById("app"));

I would love to help out with this issue; it would be really nice if anyone could point me a direction of the fix

Ngôn ngữ chính
TypeScript
Star
167
Fork
178
Merge trung bình
10 giờ 38 phút
Pull request đã merge (30 ngày)
1

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của solidjs/solid-site

Tất cả issue của solidjs/solid-site

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.