var lesson = {
	files: [
		{
			name: "main",
			content: "import { render } from 'solid-js/web';\nimport { createSignal, Index } from 'solid-js';\n\nfunction App() {\n  const [cats, setCats] = createSignal([\n    { id: 'J---aiyznGQ', name: 'Keyboard Cat' },\n    { id: 'z_AbfPXTKms', name: 'Maru' },\n    { id: 'OUtn3pvWmpg', name: 'Henri The Existential Cat' }\n  ]);\n  \n  return (\n    <ul>\n      <li>\n        <a target=\"_blank\" href=\"\">\n          1: Garfield\n        </a>\n      </li>\n    </ul>\n  );\n}\n\nrender(() => <App />, document.getElementById('app'))\n"
		}
	]
};
var solved = {
	files: [
		{
			name: "main",
			content: "import { render } from 'solid-js/web';\nimport { createSignal, Index } from 'solid-js';\n\nfunction App() {\n  const [cats, setCats] = createSignal([\n    { id: 'J---aiyznGQ', name: 'Keyboard Cat' },\n    { id: 'z_AbfPXTKms', name: 'Maru' },\n    { id: 'OUtn3pvWmpg', name: 'Henri The Existential Cat' }\n  ]);\n  \n  return (\n    <ul>\n      <Index each={cats()}>{(cat, i) =>\n        <li>\n          <a target=\"_blank\" href={`https://www.youtube.com/watch?v=${cat().id}`}>\n            {i + 1}: {cat().name}\n          </a>\n        </li>\n      }</Index>\n    </ul>\n  );\n}\n\nrender(() => <App />, document.getElementById('app'))\n"
		}
	]
};
var markdown = "When the array updates, the `<For>` component uses referential equality to compare elements to the last state of the array and decide what to rerender. But this isn't always be desired.\nWhen dealing with primitive values or arrays of arrays, treating the value as the key could cause a lot of unnecessary rendering. For example, if we mapped a list of strings to an `<input>` field that could edit each, every change to that value would cause the `<input>` to be recreated as the string seen as the unique identifier.\n\nIn these cases, we'd rather render each node according to an index of the array. For that, we have Solid's `<Index>` component. \n\n`<Index>` has a similar signature to `<For>`, except this time the item is the signal and the index is fixed: rather than an element changing placement, we're watching for an index to change its data.\n\n```jsx\n<Index each={cats()}>{(cat, i) =>\n  <li>\n    <a target=\"_blank\" href={`https://www.youtube.com/watch?v=${cat().id}`}>\n      {i + 1}: {cat().name}\n    </a>\n  </li>\n}</Index>\n```\n";
var flow_index = {
	lesson: lesson,
	solved: solved,
	markdown: markdown
};

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