Skip to content

Commit

Permalink
refactor(App.tsx): Update component rendering and variable names
Browse files Browse the repository at this point in the history
- Replace 'createSignal' with 'For' for iterating over components.
- Rename 'children' to 'examples' for better semantic meaning.
- Uncomment and adjust 'menus' as it's not currently used.
- Wrap the component returns in a parent <div> element.
  • Loading branch information
thep0y committed Dec 1, 2024
1 parent 9f89e49 commit ff4edcf
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -129,3 +129,5 @@ dist
.yarn/install-state.gz
.pnp.*
bun.lockb
.DS_Store
lib/
14 changes: 8 additions & 6 deletions src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,17 +1,19 @@
import { createSignal, lazy } from "solid-js";
import { For, lazy } from "solid-js";

const children = [
const examples = [
lazy(() => import("./components/button")),
lazy(() => import("./components/spinner")),
lazy(() => import("./components/progress")),
];

const menus = ["Button"];
//const menus = ["Button"];

const App = () => {
const [index, setIndex] = createSignal(0);

return children;
return (
<div>
<For each={examples}>{(item) => item()}</For>
</div>
);
};

export default App;

0 comments on commit ff4edcf

Please sign in to comment.