Skip to content

Same code works in playground but doesn't in tutorial #445

@tysg

Description

@tysg

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

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