-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.tsx
50 lines (46 loc) · 1.14 KB
/
index.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
import { typedjson, useTypedLoaderData } from "remix-typedjson";
export function loader() {
return typedjson({
firstObject: {
someProperty: "",
},
"firstObject.deeper": {
// If this is anything that needs special serialization, then it will break
anotherProperty: new Date(),
},
});
}
export default function Index() {
const data = useTypedLoaderData<typeof loader>();
console.log(data);
return (
<div style={{ fontFamily: "system-ui, sans-serif", lineHeight: "1.4" }}>
<h1>Welcome to Remix</h1>
<ul>
<li>
<a
target="_blank"
href="https://remix.run/tutorials/blog"
rel="noreferrer"
>
15m Quickstart Blog Tutorial
</a>
</li>
<li>
<a
target="_blank"
href="https://remix.run/tutorials/jokes"
rel="noreferrer"
>
Deep Dive Jokes App Tutorial
</a>
</li>
<li>
<a target="_blank" href="https://remix.run/docs" rel="noreferrer">
Remix Docs
</a>
</li>
</ul>
</div>
);
}