-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathApp.tsx
More file actions
22 lines (20 loc) · 696 Bytes
/
Copy pathApp.tsx
File metadata and controls
22 lines (20 loc) · 696 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
import { createContext } from "preact";
import state, { type AppStateType } from "../state.ts";
import AddTodo from "../islands/AddTodo.tsx";
import TodoList from "../islands/TodoList.tsx";
import TodoCount from "./TodoCount.tsx";
export const AppState = createContext<AppStateType>({} as AppStateType);
export default function App() {
return (
<div className="App">
<AppState.Provider value={state}>
<h1>Deno Fresh Todo App</h1>
<h2>Using Preact Signals for State Management</h2>
<TodoList />
<AddTodo />
<TodoCount />
</AppState.Provider>
<a className="standalone-counter" href="/counter">Local State Demo</a>
</div>
);
}