import React, { useState } from "react"; import { db } from "../db"; import { ErrorBoundary } from "./ErrorBoundrary"; import { ItemListComponent } from "./ItemListComponent"; import { ItemLoaderComponent } from "./ItemLoaderComponent"; export function App() { const [currentId, setCurrentId] = useState(1); return

All items

{ console.log("Liading items..."); try { const items = await db.items.toArray(); console.log("got items", items); return items; } catch (ex) { console.error("Error loading items", ex); throw ex; } }} />

Current item

db.items.get(id)} />
; }