Skip to content

Commit

Permalink
Add completedTasks to complex state mgmt (#699)
Browse files Browse the repository at this point in the history
Co-authored-by: Atila Fassina <atila@fassina.eu>
  • Loading branch information
feynmanliang and atilafassina authored Jun 21, 2024
1 parent 8037f8e commit 58f5f61
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/routes/guides/complex-state-management.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import { For, createSignal, Show, createMemo } from "solid-js"
const App = () => {
const [tasks, setTasks] = createSignal([])
const [numberOfTasks, setNumberOfTasks] = createSignal(tasks.length)
const completedTasks = createMemo(() => tasks().filter((task) => task.completed))
let input

const addTask = (text) => {
Expand Down

0 comments on commit 58f5f61

Please sign in to comment.