Open History to see the last commit
1import { ErrorBoundary, Suspense } from 'solid-js'
2import ApproachTabs from '~/components/ApproachTabs'
3
4export default function Home() {
5 return (
6 <main
7 style={{ 'max-width': '600px', margin: '0 auto', padding: '2rem 1rem' }}
8 >
9 <h1>Optimistic Updates with TanStack Query</h1>
10 <p style={{ color: '#666', 'margin-bottom': '1.5rem' }}>
11 Add todos to see optimistic updates in action. The server randomly fails
12 ~30% of the time so you can observe automatic rollback.
13 </p>
14 <ErrorBoundary
15 fallback={(error) => <p style={{ color: 'red' }}>{error.message}</p>}
16 >
17 <Suspense fallback={<p>Loading todos…</p>}>
18 <ApproachTabs />
19 </Suspense>
20 </ErrorBoundary>
21 </main>
22 )
23}