var lesson = {
	files: [
		{
			name: "main",
			content: "import { render } from \"solid-js/web\";\nimport { lazy } from \"solid-js\";\n\nimport Greeting from \"./greeting\"\n\nfunction App() {\n  return (\n    <>\n      <h1>Welcome</h1>\n      <Greeting name=\"Jake\" />\n    </>\n  );\n}\n\nrender(() => <App />, document.getElementById(\"app\"));\n"
		},
		{
			name: "greeting",
			content: "export default function Greeting(props) {\n  return <h3>Hi, {props.name}</h3>\n}"
		}
	]
};
var solved = {
	files: [
		{
			name: "main",
			content: "import { render } from \"solid-js/web\";\nimport { lazy } from \"solid-js\";\n\nconst Greeting = lazy(() => import(\"./greeting\"));\n\nfunction App() {\n  return (\n    <>\n      <h1>Welcome</h1>\n      <Greeting name=\"Jake\" />\n    </>\n  );\n}\n\nrender(() => <App />, document.getElementById(\"app\"));\n"
		},
		{
			name: "greeting",
			content: "export default function Greeting(props) {\n  return <h3>Hi, {props.name}</h3>\n}"
		}
	]
};
var markdown = "大多数打包器（如 Webpack、Rollup、Parcel、Vite）在使用动态导入时会自动进行代码分割处理。Solid 的 `lazy` 方法允许包装组件的动态导入来实现延迟加载。然后输出一个可以在 JSX 模板中正常使用的组件，它会在第一次渲染时在内部动态加载底层导入的代码，此时会暂停渲染分支直到代码可用。\n\n使用 `lazy` 替换 import 语句。\n\n```js\nimport Greeting from \"./greeting\";\n```\n\n用下面的代码替换：\n\n```js\nconst Greeting = lazy(() => import(\"./greeting\"));\n```\n\n但是仍然可能因为加载太快而无法看到效果。但是如果想让加载更明显，你可以添加一个模拟延迟。\n\n```js\nconst Greeting = lazy(async () => {\n  // 模拟延迟\n  await new Promise((r) => setTimeout(r, 1000));\n  return import(\"./greeting\");\n});\n```\n";
var async_lazy = {
	lesson: lesson,
	solved: solved,
	markdown: markdown
};

export { async_lazy as default, lesson, markdown, solved };
