-
Notifications
You must be signed in to change notification settings - Fork 0
/
App.special-routes.web.tsx
48 lines (47 loc) · 1.36 KB
/
App.special-routes.web.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
import uuid from "react-native-uuid";
// Notice the import path `@shopify/react-native-skia/lib/module/web`
// This is important only to pull the code responsible for loading Skia.
// @ts-expect-error
import { WithSkiaWeb } from "@shopify/react-native-skia/lib/module/web";
import { Text } from "react-native";
import { AppLinks } from "./routes";
export const specialRoutes: AppLinks = [
{
uuid: uuid.v4().toString(),
path: "/skia",
alias: "skia",
/** @see https://shopify.github.io/react-native-skia/docs/getting-started/web/#unsupported-features */
element: (
<WithSkiaWeb
/** @ts-ignore */
getComponent={() => import("./mobile/skia.screen")}
fallback={<Text>Loading Skia...</Text>}
/>
),
},
{
uuid: uuid.v4().toString(),
path: "/pic",
alias: "pic (skia)",
/** @see https://reactjs.org/docs/code-splitting.html#named-exports */
element: (
<WithSkiaWeb
/** @ts-ignore */
getComponent={() => import("./mobile/pic.skia.screen")}
fallback={<Text>Loading Skia...</Text>}
/>
),
},
{
uuid: uuid.v4().toString(),
path: "/actions",
alias: "actions (skia)",
element: (
<WithSkiaWeb
/** @ts-ignore */
getComponent={() => import("./mobile/actions.screen")}
fallback={<Text>Loading Skia...</Text>}
/>
),
},
];