Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
tysg opened this issue Feb 27, 2023 · 0 comments
Open

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

tysg opened this issue Feb 27, 2023 · 0 comments

Comments

@tysg
Copy link

tysg commented Feb 27, 2023

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant