Your First App
Step 1: Setup the State
/* App.ts */
import { createSignal } from "@dmnchzl/element";
function App() {
const [count, setCount] = createSignal(0);
}Step 1.5: Complexify the State
/* App.ts */
import { createComputed, createSignal } from "@dmnchzl/element";
function App() {
const [count, setCount] = createSignal(0);
const status = createComputed(() => {
if (count() >= 0) return "Positive";
return "Negative";
});
}Step 2: Create Helper Functions
Step 3: Create the Template
Step 4: Mount the App
What You've Built
Key Concepts Demonstrated
Last updated