Open History to see the last commit
1<!doctype html>
2<html lang="en">
3 <head>
4 <meta charset="utf-8" />
5 <meta name="viewport" content="width=device-width, initial-scale=1" />
6 <title>Tasks: a small task list library</title>
7 <style>
8 body { font-family: system-ui, sans-serif; max-width: 40rem; margin: 3rem auto; padding: 0 1rem; line-height: 1.6; }
9 pre { background: #f4f4f5; padding: 1rem; border-radius: 0.5rem; overflow-x: auto; }
10 </style>
11 </head>
12 <body>
13 <h1>Tasks</h1>
14 <p>A small, typed task list library with no dependencies. Every function returns a new list.</p>
15
16 <h2>Install</h2>
17 <pre><code>pnpm add @tanstack-showcase/tasks</code></pre>
18
19 <h2>Use it</h2>
20 <pre><code>import { addTask, completeTask, formatList, openTasks, progress } from '@tanstack-showcase/tasks'
21
22let list = addTask([], 'Write the docs')
23list = addTask(list, 'Fix the bug', 1)
24list = completeTask(list, 1)
25openTasks(list) // [{ id: 2, title: 'Fix the bug', done: false, priority: 1 }]
26progress(list) // 50
27formatList(list) // '- [x] Write the docs\n- [ ] Fix the bug'</code></pre>
28
29 <p><a href="https://source.tanstack.com/@TanStack/showcase">Read the code on TanStack Source</a></p>
30 </body>
31</html>