var lesson = {
	files: [
		{
			name: "main",
			content: "import { render } from \"solid-js/web\";\nimport counter from \"./counter\"\n\nfunction Counter() {\n  return (\n    <button type=\"button\">\n      0 0\n    </button>\n  );\n}\n\nrender(() => <Counter />, document.getElementById(\"app\"));\n"
		},
		{
			name: "counter",
			content: "import { createSignal, createMemo, createRoot } from \"solid-js\";\n\nfunction createCounter() {\n  const [count, setCount] = createSignal(0);\n  const increment = () => setCount(count() + 1);\n  const doubleCount = createMemo(() => count() * 2);\n  return { count, doubleCount, increment };\n}\n\nexport default createRoot(createCounter);"
		}
	]
};
var solved = {
	files: [
		{
			name: "main",
			content: "import { render } from \"solid-js/web\";\nimport counter from \"./counter\"\n\nfunction Counter() {\n  const { count, doubleCount, increment } = counter;\n\n  return (\n    <button type=\"button\" onClick={increment}>\n      {count()} {doubleCount()}\n    </button>\n  );\n}\n\nrender(() => <Counter />, document.getElementById(\"app\"));\n"
		},
		{
			name: "counter",
			content: "import { createSignal, createMemo, createRoot } from \"solid-js\";\n\nfunction createCounter() {\n  const [count, setCount] = createSignal(0);\n  const increment = () => setCount(count() + 1);\n  const doubleCount = createMemo(() => count() * 2);\n  return { count, doubleCount, increment };\n}\n\nexport default createRoot(createCounter);"
		}
	]
};
var markdown = "Context 适合用来做数据存储。Context 处理注入，将所有权与响应图联系起来，自动管理销毁，并且鉴于 Solid 的细粒度渲染，而且没有渲染开销。\n\n但是，你也可以直接将响应式系统用于简单的场景。尽管几乎没有指出的必要，但一个简单的可写 Store 确实就是一个 Signal：\n\n```js\nimport { createSignal } from 'solid-js';\n\nexport default createSignal(0);\n\n// 别的地方的代码\nimport counter from './counter';\nconst [count, setCount] = counter;\n```\n\nSolid 的响应性是一个普遍的概念。它跟是内部组件还是外部组件都没有关系。全局状态和局部状态没有不同的概念。都是一样的。\n\n唯一的限制是所有计算（Effect/Momo）都需要在响应顶层即 —— `createRoot` 下创建。Solid 的 `render` 会自动执行此操作。\n\n在本教程中，`counter.tsx` 就是这样一个全局 Store。我们可以将 `main.tsx` 中的组件修改为：\n\n```jsx\nconst { count, doubleCount, increment } = counter;\n\nreturn (\n  <button type=\"button\" onClick={increment}>\n    {count()} {doubleCount()}\n  </button>\n);\n```\n\n所以当你使用包含计算的复杂全局 Store 时，一定要调用 `createRoot`。 或者更好的选择是出于为了方便使用 Context。\n";
var stores_nocontext = {
	lesson: lesson,
	solved: solved,
	markdown: markdown
};

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