Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Same code works in playground but doesn't in tutorial

Aperta
#445 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
52/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
javascript, typescript

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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

Lingua principale
TypeScript
Stelle
167
Fork
178
Merge medio
10h 38m
PR unite (30g)
1

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di solidjs/solid-site

Tutte le issue di solidjs/solid-site

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.