-
Notifications
You must be signed in to change notification settings - Fork 4
/
App.tsx
87 lines (83 loc) · 3.13 KB
/
App.tsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
import { h } from 'preact'
import { setup } from 'goober'
import { Router, Route, lazy, ErrorBoundary } from 'preact-iso'
import Layout from './components/Layout'
setup(h)
// Pages
const NotFound = lazy(() => import('./pages/404'))
const Blog = lazy(() => import('./pages/Blog'))
const Home = lazy(() => import('./pages/Home'))
// Posts
const VDom = lazy(() => import('./pages/posts/vdom-compilers/index.mdx'))
const Inputs = lazy(() => import('./pages/posts/controlled-inputs/index.mdx'))
const Suspense = lazy(() => import('./pages/posts/suspense-data-ssr/index.mdx'))
const State = lazy(() => import('./pages/posts/state-in-vdom/index.mdx'))
const Hydration = lazy(() => import('./pages/posts/hydration/index.mdx'))
const Timings = lazy(() => import('./pages/posts/browser-timings/index.mdx'))
const UseId = lazy(() => import('./pages/posts/preact-use-id/index.mdx'))
const PersistedOperations = lazy(
() => import('./pages/posts/persisted-operations/index.mdx')
)
const GraphQLDevelopmentWorkflow = lazy(
() => import('./pages/posts/graphql-development-workflow/index.mdx')
)
const GraphQLAbstractTypes = lazy(
() => import('./pages/posts/graphql-abstract-types/index.mdx')
)
const UnreliableVendors = lazy(
() => import('./pages/posts/unreliable-vendors/index.mdx')
)
const GraphQLMissingFeature = lazy(
() => import('./pages/posts/document-authoring-missing-feature/index.mdx')
)
const FragmentsInVDOM = lazy(
() => import('./pages/posts/fragments-in-vdom/index.mdx')
)
export function App() {
return (
<>
<Layout>
<ErrorBoundary>
<div>
<Router>
<Route component={Home} path="/" />
<Route component={Blog} path="/blog" />
<Route component={VDom} path="/blog/vdom-compilers" />
<Route component={Inputs} path="/blog/controlled-inputs" />
<Route component={Suspense} path="/blog/suspense-data-ssr" />
<Route component={State} path="/blog/state-in-vdom" />
<Route component={Hydration} path="/blog/hydration-and-preact" />
<Route component={Timings} path="/blog/browser-timings" />
<Route component={UseId} path="/blog/preact-use-id" />
<Route
component={PersistedOperations}
path="/blog/persisted-operations"
/>
<Route
component={GraphQLDevelopmentWorkflow}
path="/blog/graphql-development-workflow"
/>
<Route
component={GraphQLAbstractTypes}
path="/blog/graphql-abstract-types"
/>
<Route
component={UnreliableVendors}
path="/blog/unreliable-vendors"
/>
<Route
component={GraphQLMissingFeature}
path="/blog/graphqls-missing-feature"
/>
<Route
component={FragmentsInVDOM}
path="/blog/fragments-in-vdom"
/>
<Route component={NotFound} default />
</Router>
</div>
</ErrorBoundary>
</Layout>
</>
)
}