Skip to content
Source
Sign inSign up
TanStack/showcase
A read-only demo of every feature
Every page of this repository is open, and nothing can change. Take a guided tour of what TanStack Source does.

docs: show progress and formatList in the example #15

OpenAlemTuzlakwants to merge 1 commit intomain fromdocs/progress-exampleopened

Showing 1 changed file with 3 additions and 1 deletion.

x
0 of 1 viewed, 1 left
3 additions and 1 deletionREADME.mdModified
View file
@@ -11,12 +11,14 @@
## Use it
​
```ts
-import { addTask, completeTask, openTasks } from '@tanstack-showcase/tasks'
+import { addTask, completeTask, formatList, openTasks, progress } from '@tanstack-showcase/tasks'
​
let list = addTask([], 'Write the docs')
list = addTask(list, 'Fix the bug', 1)
list = completeTask(list, 1)
openTasks(list) // [{ id: 2, title: 'Fix the bug', done: false, priority: 1 }]
+progress(list) // 50
+formatList(list) // '- [x] Write the docs\n- [ ] Fix the bug'
```
​
## API