import { jsx, jsxs, Fragment } from 'solid-jsx/jsx-runtime';

/*@jsxRuntime automatic @jsxImportSource solid-jsx*/
const toc = [];
function _createMdxContent(props) {
  const _components = Object.assign({
    p: "p",
    pre: "pre",
    code: "code",
    span: "span"
  }, props.components);
  return jsxs(Fragment, {
    children: [jsx(_components.p, {
      children: "Kesalahan/error JavaScript pada UI seharusnya tidak merusak seluruh aplikasi. Error boundaries adalah komponen yang menangkap error JavaScript di mana pun di pohon komponen turunannya, mencatat kesalahan tersebut, dan menampilkan UI fallback, bukan pohon komponen yang error."
    }), "\n", jsx(_components.p, {
      children: "Dalam contoh ini, ada komponen yang membuat aplikasi rusak/crash. Mari kita bungkus dalam Error boundaries yang menampilkan error."
    }), "\n", jsx(_components.pre, {
      children: jsxs(_components.code, {
        className: "hljs language-jsx",
        children: ["<", jsx(_components.span, {
          className: "hljs-title class_",
          children: "ErrorBoundary"
        }), " fallback={", jsxs(_components.span, {
          className: "hljs-function",
          children: [jsx(_components.span, {
            className: "hljs-params",
            children: "err"
          }), " =>"]
        }), " err}>\n  ", jsx(_components.span, {
          className: "xml",
          children: jsxs(_components.span, {
            className: "hljs-tag",
            children: ["<", jsx(_components.span, {
              className: "hljs-name",
              children: "Broken"
            }), " />"]
          })
        }), "\n</", jsx(_components.span, {
          className: "hljs-title class_",
          children: "ErrorBoundary"
        }), ">\n"]
      })
    })]
  });
}
function MDXContent(props = {}) {
  const {wrapper: MDXLayout} = props.components || ({});
  return MDXLayout ? jsx(MDXLayout, Object.assign({}, props, {
    children: jsx(_createMdxContent, props)
  })) : _createMdxContent(props);
}

export { MDXContent as default, toc };
//# sourceMappingURL=lesson-c3662253.js.map
