Skip to content

Commit 61a688b

Browse files
refactor(demo): try putting todomvc in own package name
1 parent 6a077b3 commit 61a688b

File tree

21 files changed

+24
-1
lines changed

21 files changed

+24
-1
lines changed
File renamed without changes.

packages/demos/todomvc/package.json renamed to packages/demos/overmind-todomvc/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"name": "todomvc",
2+
"name": "overmind-todomvc",
33
"private": true,
44
"version": "1.0.0-alpha1",
55
"description": "Overmind todomvc demo",
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
import { derive, compute } from 'overmind'
2+
3+
export type Todo = {
4+
id: string
5+
title: string
6+
completed: boolean
7+
}
8+
9+
export type State = {
10+
todos: Todo[]
11+
newTodoTitle: string
12+
count: number
13+
testCount: (foo: number) => number
14+
}
15+
16+
const state: State = {
17+
todos: [],
18+
count: derive((state: State) => state.todos.length),
19+
newTodoTitle: '',
20+
testCount: compute((foo: number) => (state: State) => state.count + foo),
21+
}
22+
23+
export default state

packages/demos/todomvc/src/components/AddTodo/elements.tsx renamed to packages/demos/overmind-todomvc/src/components/AddTodo/elements.tsx

File renamed without changes.

packages/demos/todomvc/src/components/AddTodo/index.tsx renamed to packages/demos/overmind-todomvc/src/components/AddTodo/index.tsx

File renamed without changes.

0 commit comments

Comments
 (0)